jsdoc/test/specs/documentation/methoddefinition.js
Jeff Williams aa0b6c1bfa switch to new-ish ECMAScript syntax
With help from Lebab, plus a lot of manual cleanup. (And more cleanup to come, I'm sure.)
2019-01-15 18:39:10 -08:00

16 lines
672 B
JavaScript

describe('method definition inside a class declaration', () => {
const docSet = jasmine.getDocSetFromFile('test/fixtures/methoddefinition.js');
const runMethod = docSet.getByLongname('Test#run')[0];
const staticRunMethod = docSet.getByLongname('Test.run')[0];
it('methods should have documentation comments', () => {
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');
});
});