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

18 lines
670 B
JavaScript

describe('const declarations', () => {
it('should automatically set the doclet.kind to "constant" for const declarations', () => {
const docSet = jasmine.getDocSetFromFile('test/fixtures/constanttag.js');
const myPocket = docSet.getByLongname('myPocket')[0];
expect(myPocket.kind).toBe('constant');
});
describe('ES 2015 only', () => {
it('should not override kind="class" when a const is autodetected', () => {
const docSet = jasmine.getDocSetFromFile('test/fixtures/constanttag2.js');
const foo = docSet.getByLongname('Foo')[0];
expect(foo.kind).toBe('class');
});
});
});