From 3fcfc5d35eda9af2d49ff020daf5523c080bb9c2 Mon Sep 17 00:00:00 2001 From: lmatiolis Date: Fri, 3 Apr 2015 19:55:38 -0300 Subject: [PATCH] Fix test errors and add mocha to jshint configs. Can't fix "Expected an assignment or function call and instead saw an expression." because chai uses properties to call an assertion. Problem was discussed in: chaijs/chai#41 --- .jshintrc | 3 ++- test/integration/init_game.spec.js | 4 +++- test/unit/engine.spec.js | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.jshintrc b/.jshintrc index 7584833..daf41fe 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,5 +1,6 @@ { "curly": true, "eqeqeq": true, - "undef": true + "undef": true, + "mocha": true } diff --git a/test/integration/init_game.spec.js b/test/integration/init_game.spec.js index 019bbe5..30d583c 100644 --- a/test/integration/init_game.spec.js +++ b/test/integration/init_game.spec.js @@ -1,3 +1,5 @@ +/* global nsn: true, expect: true */ + describe('main', function(){ describe('initGame()', function(){ @@ -12,6 +14,6 @@ describe('main', function(){ it('resizes screen'); it('runs Bootstrap init'); - }) + }); }); diff --git a/test/unit/engine.spec.js b/test/unit/engine.spec.js index 96e3284..a162bba 100644 --- a/test/unit/engine.spec.js +++ b/test/unit/engine.spec.js @@ -1,3 +1,5 @@ +/* global nsn: true, expect: true, sinon: true */ + describe('Engine', function(){ before(function(){ nsn.GameSound = sinon.stub(); @@ -30,6 +32,6 @@ describe('Engine', function(){ it('has init()', function(){ expect(nsn.Engine).to.respondTo('init'); }); - }) + }); });