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

25 lines
970 B
JavaScript

/*global describe: true, expect: true, it: true, jasmine: true */
describe("When a getter or setter is the child of an object literal", function () {
var docSet = jasmine.getDocSetFromFile("test/fixtures/getset.js");
var foundName = docSet.getByLongname("Person#name");
var foundAge = docSet.getByLongname("Person#age");
it("should have a doclet with the correct longname", function () {
expect(foundName.length).toEqual(2);
expect(foundAge.length).toEqual(1);
});
it("should have a doclet with the correct name", function () {
expect(foundName[0].name).toEqual("name");
expect(foundName[1].name).toEqual("name");
expect(foundAge[0].name).toEqual("age");
});
it("should have the correct memberof", function () {
expect(foundName[0].memberof).toEqual("Person");
expect(foundName[1].memberof).toEqual("Person");
expect(foundAge[0].memberof).toEqual("Person");
});
});