quotename.js 927 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. describe('quoted names', function() {
  3. describe('when found in square brackets', function() {
  4. var docSet = jasmine.getDocSetFromFile('test/fixtures/quotename.js');
  5. var found1 = docSet.getByLongname('chat."#channel".open')[0];
  6. it('should have correct name and memberof', function() {
  7. expect(found1.name).toEqual('open');
  8. expect(found1.memberof).toEqual('chat."#channel"');
  9. });
  10. });
  11. describe('when found in an object literal', function() {
  12. var docSet = jasmine.getDocSetFromFile('test/fixtures/quotename2.js');
  13. var found1 = docSet.getByLongname('contacts."say-\\"hello\\"@example.com".username')[0];
  14. it('should have correct name and memberof', function() {
  15. expect(found1.name).toEqual('username');
  16. expect(found1.memberof).toEqual('contacts."say-\\"hello\\"@example.com"');
  17. });
  18. });
  19. });