const.js 697 B

1234567891011121314151617181920
  1. 'use strict';
  2. describe('const declarations', function() {
  3. it('should automatically set the doclet.kind to "constant" for const declarations', function() {
  4. var docSet = jasmine.getDocSetFromFile('test/fixtures/constanttag.js');
  5. var myPocket = docSet.getByLongname('myPocket')[0];
  6. expect(myPocket.kind).toBe('constant');
  7. });
  8. describe('ES 2015 only', function() {
  9. it('should not override kind="class" when a const is autodetected', function() {
  10. var docSet = jasmine.getDocSetFromFile('test/fixtures/constanttag2.js');
  11. var foo = docSet.getByLongname('Foo')[0];
  12. expect(foo.kind).toBe('class');
  13. });
  14. });
  15. });