From cdc8a1c2249cdd844d45c7787e0f0f53ea98ae67 Mon Sep 17 00:00:00 2001 From: mathematicalcoffee Date: Fri, 15 Feb 2013 16:00:08 +1000 Subject: [PATCH] @tutorial: added low-level tests --- test/specs/tags/tutorialtag.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/specs/tags/tutorialtag.js diff --git a/test/specs/tags/tutorialtag.js b/test/specs/tags/tutorialtag.js new file mode 100644 index 00000000..ea345ccd --- /dev/null +++ b/test/specs/tags/tutorialtag.js @@ -0,0 +1,13 @@ +describe("@tutorial tag", function() { + // these are tests for the block usage, not the inline usage. see util/templateHelper for that. + var doclet = require('jsdoc/doclet'), + doc = new doclet.Doclet('/** @tutorial tute1\n@tutorial tute2 */', {}); + + it("adds the listed tutorials to a 'tutorials' array on the doclet", function () { + expect(Array.isArray(doc.tutorials)).toBeTruthy(); + expect(doc.tutorials.length).toBe(2); + expect(doc.tutorials).toContain('tute1'); + expect(doc.tutorials).toContain('tute2'); + }); +}); +