From ff77157eb1192a9f1c6e7a39273fc2fd66c55b56 Mon Sep 17 00:00:00 2001 From: mathematicalcoffee Date: Fri, 15 Feb 2013 14:34:57 +1000 Subject: [PATCH] @inner, @instance, @static tests added --- test/specs/tags/scopetags.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/specs/tags/scopetags.js diff --git a/test/specs/tags/scopetags.js b/test/specs/tags/scopetags.js new file mode 100644 index 00000000..c91ba254 --- /dev/null +++ b/test/specs/tags/scopetags.js @@ -0,0 +1,30 @@ +// @inner, @instance, @static (@global has its own file) +describe("@inner tag", function() { + var doclet = require('jsdoc/doclet'), + doc = new doclet.Doclet('/** @name Foo\n@scope inner */', {}); + + it("sets the doclet's 'scope' property to 'inner'", function() { + expect(doc.scope).toBeDefined(); + expect(doc.scope).toBe('inner'); + }); +}); + +describe("@instance tag", function() { + var doclet = require('jsdoc/doclet'), + doc = new doclet.Doclet('/** @name Foo\n@scope instance */', {}); + + it("sets the doclet's 'scope' property to 'instance'", function() { + expect(doc.scope).toBeDefined(); + expect(doc.scope).toBe('instance'); + }); +}); + +describe("@static tag", function() { + var doclet = require('jsdoc/doclet'), + doc = new doclet.Doclet('/** @name Foo\n@scope static */', {}); + + it("sets the doclet's 'scope' property to 'static'", function() { + expect(doc.scope).toBeDefined(); + expect(doc.scope).toBe('static'); + }); +});