jsdoc/test/specs/documentation/quotename.js
Jeff Williams 44d9ec6831 new parser infrastructure
consumes ASTs that follow the Mozilla Parser API spec:
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API

passes all tests on OS X; performance is comparable to previous
version. also includes some miscellaneous cleanup.

remaining issues:
- only Rhino AST builder is supported
- node visitors (old and new) may not be hooked up yet
- circular-reference issues in doclets
- docs are (mostly) missing
- various other TODO comments
2013-06-23 10:18:13 -07:00

24 lines
971 B
JavaScript

/*global describe: true, expect: true, it: true, jasmine: true */
describe("quoted names", function() {
describe("when found in square brackets", function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/quotename.js');
var found1 = docSet.getByLongname('chat.\"#channel\".open')[0];
it('should have correct name and memberof', function() {
expect(found1.name).toEqual('open');
expect(found1.memberof).toEqual('chat.\"#channel\"');
});
});
describe("when found in an object literal", function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/quotename2.js');
var found1 = docSet.getByLongname('contacts.say-"hello"@example.com.username')[0];
it('should have correct name and memberof', function() {
expect(found1.name).toEqual('username');
expect(found1.memberof).toEqual('contacts.say-"hello"@example.com');
});
});
});