mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
28 lines
1.0 KiB
JavaScript
28 lines
1.0 KiB
JavaScript
'use strict';
|
|
|
|
describe('anonymous class', function() {
|
|
var docSet = jasmine.getDocSetFromFile('test/fixtures/anonymousclass.js');
|
|
var klass = docSet.getByLongname('module:test').filter(function($) {
|
|
return !$.undocumented;
|
|
})[1];
|
|
var foo = docSet.getByLongname('module:test#foo')[0];
|
|
var klassTest = docSet.getByLongname('module:test#test')[0];
|
|
var klassStaticTest = docSet.getByLongname('module:test.staticTest')[0];
|
|
|
|
it('should merge the constructor docs with the class docs', function() {
|
|
expect(klass.description).toBe('Test constructor');
|
|
});
|
|
|
|
it('should use the correct longname for instance properties', function() {
|
|
expect(foo.description).toBe('Test member');
|
|
});
|
|
|
|
it('should use the correct longname for instance methods', function() {
|
|
expect(klassTest.description).toBe('Test method');
|
|
});
|
|
|
|
it('should use the correct longname for static methods', function() {
|
|
expect(klassStaticTest.description).toBe('Test static method');
|
|
});
|
|
});
|