inner.js 955 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. describe('when a documented var memeber is inside a named function', function() {
  3. var docSet = jasmine.getDocSetFromFile('test/fixtures/inner.js');
  4. var found1 = docSet.getByLongname('sendMessage~encoding');
  5. var found2 = docSet.getByLongname('sendMessage~encrypt');
  6. it('A doclet with the correct longname should be found', function() {
  7. expect(found1.length).toBe(1);
  8. expect(found2.length).toBe(1);
  9. });
  10. it('The short name should be correct', function() {
  11. expect(found1[0].name).toBe('encoding');
  12. expect(found2[0].name).toBe('encrypt');
  13. });
  14. it('The memberof should be correct', function() {
  15. expect(found1[0].memberof).toBe('sendMessage');
  16. expect(found2[0].memberof).toBe('sendMessage');
  17. });
  18. it('The scope should default to "inner"', function() {
  19. expect(found1[0].scope).toBe('inner');
  20. expect(found2[0].scope).toBe('inner');
  21. });
  22. });