UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

12 lines (11 loc) 367 B
import { isBuffer } from './isBuffer'; describe(`isBuffer`, () => { it(`should return true if value is a Buffer`, () => { const value = Buffer.from(''); expect(isBuffer(value)).toBe(true); }); it(`should return false if value is not a Buffer`, () => { const value = Buffer; expect(isBuffer(value)).toBe(false); }); });