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

20 lines
977 B
JavaScript

describe("'exports' symbol in modules", () => {
const docSet = jsdoc.getDocSetFromFile('test/fixtures/exports.js');
const sayHello = docSet.getByLongname('module:hello/world.sayHello')[0];
const sayGoodbye = docSet.getByLongname('module:hello/world.sayGoodbye')[0];
it('When a symbol starts with the special name "exports" and is in a file with a ' +
'@module tag, the symbol is documented as a member of that module.', () => {
expect(typeof sayHello).toBe('object');
expect(sayHello.kind).toBe('function');
expect(sayHello.memberof).toBe('module:hello/world');
});
it('When a symbol starts with the special name "module.exports" and is in a file with a ' +
'@module tag, the symbol is documented as a member of that module.', () => {
expect(typeof sayGoodbye).toBe('object');
expect(sayGoodbye.kind).toBe('function');
expect(sayGoodbye.memberof).toBe('module:hello/world');
});
});