diff --git a/test/specs/jsdoc/tag.js b/test/specs/jsdoc/tag.js index 937a21af..a324a9c3 100644 --- a/test/specs/jsdoc/tag.js +++ b/test/specs/jsdoc/tag.js @@ -134,8 +134,7 @@ describe("jsdoc/tag", function() { // further tests for this sort of thing are in jsdoc/tag/validator.js tests. describe("tag validating", function() { /*jshint evil: true */ - var lenient = !!env.opts.lenient, - log = eval(console.log); + var lenient = !!env.opts.lenient; function badTag() { var tag = new jsdoc.tag.Tag("name"); @@ -144,7 +143,6 @@ describe("jsdoc/tag", function() { afterEach(function() { env.opts.lenient = lenient; - console.log = log; }); it("throws an exception for bad tags if the lenient option is not enabled", function() { @@ -154,7 +152,7 @@ describe("jsdoc/tag", function() { }); it("doesn't throw an exception for bad tags if the lenient option is enabled", function() { - console.log = function() {}; + spyOn(console, 'log'); env.opts.lenient = true; expect(badTag).not.toThrow(); diff --git a/test/specs/jsdoc/tag/validator.js b/test/specs/jsdoc/tag/validator.js index 60ed3b4f..56070edb 100644 --- a/test/specs/jsdoc/tag/validator.js +++ b/test/specs/jsdoc/tag/validator.js @@ -17,7 +17,6 @@ describe('jsdoc/tag/validator', function() { describe('validate', function() { var lenient = !!env.opts.lenient, allowUnknown = !!env.conf.tags.allowUnknownTags, - log = eval(console.log), badTag = {title: 'lkjasdlkjfb'}, meta = {filename: 'asdf.js', lineno: 1}, goodTag = new tag.Tag('name', 'MyDocletName', meta), // mustHaveValue @@ -28,13 +27,12 @@ describe('jsdoc/tag/validator', function() { } beforeEach(function() { - console.log = function() {}; + spyOn(console, 'log'); }); afterEach(function() { env.opts.lenient = lenient; env.conf.tags.allowUnknownTags = allowUnknown; - console.log = log; }); it("throws an error if the tag is not in the dictionary, conf.tags.allowUnknownTags is false and lenient is false", function() { diff --git a/test/specs/tags/paramtag.js b/test/specs/tags/paramtag.js index 05cb3aa3..d3d71536 100644 --- a/test/specs/tags/paramtag.js +++ b/test/specs/tags/paramtag.js @@ -63,7 +63,7 @@ describe("@param tag", function() { expect(commit.params[0].description).toBe('If true make the commit atomic.'); }); - it('When a symbol has a @param tag with no type but a name that indicates a default value or optional type, this infor is copied over to the params property.', function() { + it('When a symbol has a @param tag with no type but a name that indicates a default value or optional type, this is copied over to the params property.', function() { expect(typeof request.params).toBe('object'); expect(request.params.length).toBe(1); expect(request.params[0].type).toBeUndefined();