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.
25 lines
919 B
JavaScript
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');
|
|
});
|
|
});
|