UNPKG

@qntm-code/utils

Version:

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

13 lines (12 loc) 504 B
/* eslint-disable @typescript-eslint/no-empty-function */ import { isGeneratorObject } from './isGeneratorObject'; describe(`isGeneratorObject`, () => { it(`should return true if value is a generator object`, () => { const value = (function* () { })(); expect(isGeneratorObject(value)).toBe(true); }); it(`should return false if value is not a generator object`, () => { const value = function () { }; expect(isGeneratorObject(value)).toBe(false); }); });