mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
20 lines
699 B
JavaScript
20 lines
699 B
JavaScript
/* global jsdoc */
|
|
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);
|
|
});
|
|
});
|