specialnames.js 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. 'use strict';
  2. describe('documenting symbols with special names', function() {
  3. var docSet = jasmine.getDocSetFromFile('test/fixtures/specialnames.js');
  4. var construct = docSet.getByLongname('constructor')[0];
  5. var constructToString = docSet.getByLongname('constructor.toString')[0];
  6. var hasOwnProp = docSet.getByLongname('hasOwnProperty')[0];
  7. var proto = docSet.getByLongname('prototype')[0];
  8. var protoValueOf = docSet.getByLongname('prototype.valueOf')[0];
  9. it('When a symbol is named "constructor", the symbol should appear in the docs.', function() {
  10. expect(construct).toBeDefined();
  11. });
  12. it('When a symbol is named "constructor", its members are resolved correctly.', function() {
  13. expect(constructToString).toBeDefined();
  14. });
  15. it('When a symbol is named "hasOwnProperty," the symbol should appear in the docs.', function() {
  16. expect(hasOwnProp).toBeDefined();
  17. });
  18. it('When a symbol is named "prototype", the symbol should appear in the docs.', function() {
  19. expect(proto).toBeDefined();
  20. });
  21. it('When a symbol is named "prototype", its members are resolved correctly.', function() {
  22. expect(protoValueOf).toBeDefined();
  23. });
  24. });