jsdoc/test/specs/documentation/moduleisfunction.js
Jeff Williams aa0b6c1bfa switch to new-ish ECMAScript syntax
With help from Lebab, plus a lot of manual cleanup. (And more cleanup to come, I'm sure.)
2019-01-15 18:39:10 -08:00

20 lines
730 B
JavaScript

describe('module that exports a function that is not a constructor', () => {
const docSet = jasmine.getDocSetFromFile('test/fixtures/moduleisfunction.js');
const functions = docSet.doclets.filter(({kind}) => kind === 'function');
it('should include one doclet whose kind is "function"', () => {
expect(functions.length).toBe(1);
expect(functions[0].kind).toBe('function');
});
describe('function doclet', () => {
it('should not include a "scope" property', () => {
expect(functions[0].scope).not.toBeDefined();
});
it('should not include a "memberof" property', () => {
expect(functions[0].memberof).not.toBeDefined();
});
});
});