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

25 lines
919 B
JavaScript

describe('when a documented var memeber is inside a named function', () => {
const docSet = jsdoc.getDocSetFromFile('test/fixtures/inner.js');
const found1 = docSet.getByLongname('sendMessage~encoding');
const found2 = docSet.getByLongname('sendMessage~encrypt');
it('A doclet with the correct longname should be found', () => {
expect(found1.length).toBe(1);
expect(found2.length).toBe(1);
});
it('The short name should be correct', () => {
expect(found1[0].name).toBe('encoding');
expect(found2[0].name).toBe('encrypt');
});
it('The memberof should be correct', () => {
expect(found1[0].memberof).toBe('sendMessage');
expect(found2[0].memberof).toBe('sendMessage');
});
it('The scope should default to "inner"', () => {
expect(found1[0].scope).toBe('inner');
expect(found2[0].scope).toBe('inner');
});
});