anonymousclass.js 1.0 KB

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. describe('anonymous class', function() {
  3. var docSet = jasmine.getDocSetFromFile('test/fixtures/anonymousclass.js');
  4. var klass = docSet.getByLongname('module:test').filter(function($) {
  5. return !$.undocumented;
  6. })[1];
  7. var foo = docSet.getByLongname('module:test#foo')[0];
  8. var klassTest = docSet.getByLongname('module:test#test')[0];
  9. var klassStaticTest = docSet.getByLongname('module:test.staticTest')[0];
  10. it('should merge the constructor docs with the class docs', function() {
  11. expect(klass.description).toBe('Test constructor');
  12. });
  13. it('should use the correct longname for instance properties', function() {
  14. expect(foo.description).toBe('Test member');
  15. });
  16. it('should use the correct longname for instance methods', function() {
  17. expect(klassTest.description).toBe('Test method');
  18. });
  19. it('should use the correct longname for static methods', function() {
  20. expect(klassStaticTest.description).toBe('Test static method');
  21. });
  22. });