From 791181b65d7d8a2bd69b43b574cc84bb1446568c Mon Sep 17 00:00:00 2001 From: mathematicalcoffee Date: Mon, 18 Mar 2013 11:16:27 +1000 Subject: [PATCH] fix #363 (I think) where tutorial tests fail on the second round of execution --- test/specs/jsdoc/util/templateHelper.js | 31 +++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/test/specs/jsdoc/util/templateHelper.js b/test/specs/jsdoc/util/templateHelper.js index afcc2a4d..a96b80be 100644 --- a/test/specs/jsdoc/util/templateHelper.js +++ b/test/specs/jsdoc/util/templateHelper.js @@ -959,7 +959,7 @@ describe("jsdoc/util/templateHelper", function() { }); }); - xdescribe("toTutorial", function() { + describe("toTutorial", function() { var lenient = !!env.opts.lenient; function missingParam() { @@ -990,33 +990,34 @@ describe("jsdoc/util/templateHelper", function() { // missing tutorials it("returns the tutorial name if it's missing and no missingOpts is provided", function() { + console.log("returns the tutorial name if it's missing and no missingOpts is provided"); helper.setTutorials(resolver.root); - var link = helper.toTutorial('asdf'); - expect(link).toBe('asdf'); + var link = helper.toTutorial('qwerty'); + expect(link).toBe('qwerty'); }); it("returns the tutorial name wrapped in missingOpts.tag if provided and the tutorial is missing", function() { - var link = helper.toTutorial('asdf', 'lkjklasdf', {tag: 'span'}); - expect(link).toBe('asdf'); + var link = helper.toTutorial('qwerty', 'lkjklqwerty', {tag: 'span'}); + expect(link).toBe('qwerty'); }); it("returns the tutorial name wrapped in missingOpts.tag with class missingOpts.classname if provided and the tutorial is missing", function() { - var link = helper.toTutorial('asdf', 'lkjklasdf', {classname: 'missing'}); - expect(link).toBe('asdf'); + var link = helper.toTutorial('qwerty', 'lkjklqwerty', {classname: 'missing'}); + expect(link).toBe('qwerty'); - link = helper.toTutorial('asdf', 'lkjklasdf', {tag: 'span', classname: 'missing'}); - expect(link).toBe('asdf'); + link = helper.toTutorial('qwerty', 'lkjklqwerty', {tag: 'span', classname: 'missing'}); + expect(link).toBe('qwerty'); }); it("prefixes the tutorial name with missingOpts.prefix if provided and the tutorial is missing", function() { - var link = helper.toTutorial('asdf', 'lkjklasdf', {tag: 'span', classname: 'missing', prefix: 'TODO-'}); - expect(link).toBe('TODO-asdf'); + var link = helper.toTutorial('qwerty', 'lkjklqwerty', {tag: 'span', classname: 'missing', prefix: 'TODO-'}); + expect(link).toBe('TODO-qwerty'); - link = helper.toTutorial('asdf', 'lkjklasdf', {prefix: 'TODO-'}); - expect(link).toBe('TODO-asdf'); + link = helper.toTutorial('qwerty', 'lkjklqwerty', {prefix: 'TODO-'}); + expect(link).toBe('TODO-qwerty'); - link = helper.toTutorial('asdf', 'lkjklasdf', {prefix: 'TODO-', classname: 'missing'}); - expect(link).toBe('TODO-asdf'); + link = helper.toTutorial('qwerty', 'lkjklqwerty', {prefix: 'TODO-', classname: 'missing'}); + expect(link).toBe('TODO-qwerty'); }); // now we do non-missing tutorials.