mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
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.
19 lines
664 B
JavaScript
19 lines
664 B
JavaScript
describe('async functions', () => {
|
|
const docSet = jsdoc.getDocSetFromFile('test/fixtures/asyncfunction.js');
|
|
const add = docSet.getByLongname('add')[0];
|
|
const subtract = docSet.getByLongname('subtract')[0];
|
|
const adderAdd = docSet.getByLongname('Adder#add')[0];
|
|
|
|
it('should automatically document async functions as async', () => {
|
|
expect(add.async).toBe(true);
|
|
});
|
|
|
|
it('should work when the async function is assigned to a variable', () => {
|
|
expect(subtract.async).toBe(true);
|
|
});
|
|
|
|
it('should work when the async function is a method definition', () => {
|
|
expect(adderAdd.async).toBe(true);
|
|
});
|
|
});
|