mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
With help from Lebab, plus a lot of manual cleanup. (And more cleanup to come, I'm sure.)
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
function filter({undocumented}) {
|
|
return !undocumented;
|
|
}
|
|
|
|
describe('module classes', () => {
|
|
const docSet = jasmine.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');
|
|
});
|
|
});
|
|
});
|