jsdoc/test/specs/documentation/moduleclasses.js
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

34 lines
1.2 KiB
JavaScript

function filter({undocumented}) {
return !undocumented;
}
describe('module classes', () => {
const docSet = jsdoc.getDocSetFromFile('test/fixtures/moduleclasses.js');
const bar = docSet.getByLongname('module:foo~Bar').filter(filter)[0];
const barBar = docSet.getByLongname('module:foo~Bar#bar')[0];
const baz = docSet.getByLongname('module:foo.Baz').filter(filter)[0];
const bazBaz = docSet.getByLongname('module:foo.Baz#baz')[0];
describe('inner classes', () => {
it('should merge the constructor doclet with the class doclet', () => {
expect(bar.description).toBe('Construct a Bar.');
expect(bar.classdesc).toBe('Bar class.');
});
it('should correctly mark the scope of instance properties', () => {
expect(barBar.scope).toBe('instance');
});
});
describe('exported classes', () => {
it('should merge the constructor doclet with the class doclet', () => {
expect(baz.description).toBe('Construct a Baz.');
expect(baz.classdesc).toBe('Baz class.');
});
it('should correctly mark the scope of instance properties', () => {
expect(bazBaz.scope).toBe('instance');
});
});
});