Skip to content

Commit

Permalink
Use strict mode in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok authored and FagnerMartinsBrack committed Jan 9, 2017
1 parent 81e8c0b commit 4e77d05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"qunit": true,

"-W053": true,
"-W097": true, // disable warning for 'Use the function form of "use strict".'

"extends": "../.jshintrc",
"globals": {
Expand Down
4 changes: 3 additions & 1 deletion test/tests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/*global lifecycle: true*/

QUnit.module('read', lifecycle);
Expand Down Expand Up @@ -402,7 +404,7 @@ QUnit.test('Object Constructor', function (assert) {

QUnit.test('Use String(value) for unsupported objects that do not stringify into JSON', function (assert) {
assert.expect(2);
Cookies.set('date', new Date(2015, 04, 13, 0, 0, 0, 0));
Cookies.set('date', new Date(2015, 4, 13, 0, 0, 0, 0));
assert.strictEqual(Cookies.get('date').indexOf('"'), -1, 'should not quote the stringified Date object');
assert.strictEqual(Cookies.getJSON('date').indexOf('"'), -1, 'should not quote the stringified Date object');
});
Expand Down

0 comments on commit 4e77d05

Please sign in to comment.