jsdoc/test/specs/documentation/generators.js
Jeff Williams 617b3236bf Replace old, vendored Jasmine with current npm package.
JSDoc-specific test functions are now properties of a `jsdoc` global, not a `jasmine` global.

Also updates license files to reflect the fact that we no longer vendor anything.
2019-05-12 15:10:38 -07:00

19 lines
680 B
JavaScript

describe('generator functions', () => {
const docSet = jsdoc.getDocSetFromFile('test/fixtures/generators.js');
const startsAt0 = docSet.getByLongname('startsAt0')[0];
const startsAt1 = docSet.getByLongname('startsAt1')[0];
const startsAt2 = docSet.getByLongname('Generator#startsAt2')[0];
it('should flag generator functions', () => {
expect(startsAt0.generator).toBe(true);
});
it('should flag generator functions assigned to variables', () => {
expect(startsAt1.generator).toBe(true);
});
it('should flag generator functions that are method definitions', () => {
expect(startsAt2.generator).toBe(true);
});
});