This commit is contained in:
Jeff Williams 2014-10-05 21:31:24 -07:00
parent df7a1e0232
commit 765abd9a10

View File

@ -1,43 +1,45 @@
describe("object literals", function() {
describe("When a child of an objlit has no @name or @memberof tags", function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/objectlit.js'),
found = docSet.getByLongname('tools.serialiser.value');
/*global describe, expect, it, jasmine */
it("should have a doclet with the correct longname", function() {
expect(found.length).toEqual(1);
describe('object literals', function() {
describe('When a child of an objlit has no @name or @memberof tags', function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/objectlit.js');
var found = docSet.getByLongname('tools.serialiser.value');
it('should have a doclet with the correct longname', function() {
expect(found.length).toBe(1);
});
it("should have a doclet with the correct name", function() {
expect(found[0].name).toEqual('value');
it('should have a doclet with the correct name', function() {
expect(found[0].name).toBe('value');
});
it("should have the correct memberof", function() {
expect(found[0].memberof).toEqual('tools.serialiser');
it('should have the correct memberof', function() {
expect(found[0].memberof).toBe('tools.serialiser');
});
it("should have a static scope", function() {
expect(found[0].scope).toEqual('static');
it('should have a static scope', function() {
expect(found[0].scope).toBe('static');
});
});
describe("When a parent of an objlit has no documentation", function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/objectlit2.js'),
found = docSet.getByLongname('position.axis.x');
describe('When a parent of an objlit has no documentation', function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/objectlit2.js');
var found = docSet.getByLongname('position.axis.x');
it("should have a doclet with the correct longname", function() {
expect(found.length).toEqual(1);
it('should have a doclet with the correct longname', function() {
expect(found.length).toBe(1);
});
it("should have a doclet with the correct name", function() {
expect(found[0].name).toEqual('x');
it('should have a doclet with the correct name', function() {
expect(found[0].name).toBe('x');
});
it("should have the correct memberof", function() {
expect(found[0].memberof).toEqual('position.axis');
it('should have the correct memberof', function() {
expect(found[0].memberof).toBe('position.axis');
});
it("should have a static scope", function() {
expect(found[0].scope).toEqual('static');
it('should have a static scope', function() {
expect(found[0].scope).toBe('static');
});
});
});
});