@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
15 lines (14 loc) • 634 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable @typescript-eslint/no-empty-function */
const isGeneratorObject_1 = require("./isGeneratorObject");
describe(`isGeneratorObject`, () => {
it(`should return true if value is a generator object`, () => {
const value = (function* () { })();
expect((0, isGeneratorObject_1.isGeneratorObject)(value)).toBe(true);
});
it(`should return false if value is not a generator object`, () => {
const value = function () { };
expect((0, isGeneratorObject_1.isGeneratorObject)(value)).toBe(false);
});
});