mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
With help from Lebab, plus a lot of manual cleanup. (And more cleanup to come, I'm sure.)
19 lines
682 B
JavaScript
19 lines
682 B
JavaScript
describe('generator functions', () => {
|
|
const docSet = jasmine.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);
|
|
});
|
|
});
|