Skip to content

Commit fbb0117

Browse files
committed
Date.parse works a bit different in Firefox and IE and Webkit. Also fixing
the creation of global variables in the test.
1 parent ecb597b commit fbb0117

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/tests.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ test('expires option as days from now', function () {
197197
test('expires option as fraction of a day', function () {
198198
expect(1);
199199

200-
now = new Date().getTime();
201-
expires = Date.parse($.cookie('c', 'v', { expires: 0.5 }));
200+
var now = new Date().getTime();
201+
var expires = Date.parse($.cookie('c', 'v', { expires: 0.5 }).replace(/.+expires=/, ''));
202202

203203
// When we were using Date.setDate() fractions have been ignored
204204
// and expires resulted in the current date. Allow 1000 milliseconds

0 commit comments

Comments
 (0)