moduleclasses.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. 'use strict';
  2. function filter($) {
  3. return !$.undocumented;
  4. }
  5. describe('module classes', function() {
  6. var docSet = jasmine.getDocSetFromFile('test/fixtures/moduleclasses.js');
  7. var bar = docSet.getByLongname('module:foo~Bar').filter(filter)[0];
  8. var barBar = docSet.getByLongname('module:foo~Bar#bar')[0];
  9. var baz = docSet.getByLongname('module:foo.Baz').filter(filter)[0];
  10. var bazBaz = docSet.getByLongname('module:foo.Baz#baz')[0];
  11. describe('inner classes', function() {
  12. it('should merge the constructor doclet with the class doclet', function() {
  13. expect(bar.description).toBe('Construct a Bar.');
  14. expect(bar.classdesc).toBe('Bar class.');
  15. });
  16. it('should correctly mark the scope of instance properties', function() {
  17. expect(barBar.scope).toBe('instance');
  18. });
  19. });
  20. describe('exported classes', function() {
  21. it('should merge the constructor doclet with the class doclet', function() {
  22. expect(baz.description).toBe('Construct a Baz.');
  23. expect(baz.classdesc).toBe('Baz class.');
  24. });
  25. it('should correctly mark the scope of instance properties', function() {
  26. expect(bazBaz.scope).toBe('instance');
  27. });
  28. });
  29. });