jsdoc/test/specs/documentation/methoddefinition.js
Jeff Williams 4b8504cac9 support ES 2015 classes (#555, #769)
Incorporates work by @eventualbuddha.
2015-03-18 17:14:04 -07:00

20 lines
781 B
JavaScript

'use strict';
if (jasmine.jsParser !== 'rhino') {
describe('method definition inside a class declaration', function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/methoddefinition.js');
var runMethod = docSet.getByLongname('Test#run')[0];
var staticRunMethod = docSet.getByLongname('Test.run')[0];
it('methods should have documentation comments', function() {
expect(runMethod).toBeDefined();
expect(runMethod.description).toBe('Document me.');
expect(runMethod.kind).toBe('function');
expect(staticRunMethod).toBeDefined();
expect(staticRunMethod.description).toBe('Static document me.');
expect(staticRunMethod.kind).toBe('function');
});
});
}