Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So that we only have to maintain a single framework.
- Loading branch information
Showing
3 changed files
with
25 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,24 @@ | ||
/* global QUnit */ | ||
/* eslint-env node */ | ||
exports.node = { | ||
shouldLoadApi: function (test) { | ||
test.expect(1) | ||
const Cookies = require('../dist/js.cookie.min.js') | ||
test.ok(!!Cookies.get, 'should load the Cookies API') | ||
test.done() | ||
}, | ||
shouldNotThrowErrorForSetCallInNode: function (test) { | ||
test.expect(0) | ||
const Cookies = require('../dist/js.cookie.min.js') | ||
Cookies.set('anything') | ||
Cookies.set('anything', { path: '' }) | ||
test.done() | ||
}, | ||
shouldNotThrowErrorForGetCallInNode: function (test) { | ||
test.expect(0) | ||
const Cookies = require('../dist/js.cookie.min.js') | ||
Cookies.get('anything') | ||
test.done() | ||
}, | ||
shouldNotThrowErrorForRemoveCallInNode: function (test) { | ||
test.expect(0) | ||
const Cookies = require('../dist/js.cookie.min.js') | ||
Cookies.remove('anything') | ||
Cookies.remove('anything', { path: '' }) | ||
test.done() | ||
} | ||
} | ||
const Cookies = require('../dist/js.cookie.min.js') | ||
|
||
QUnit.test('api', (assert) => { | ||
assert.ok(Cookies.get, 'get() expected to be defined') | ||
assert.ok(Cookies.set, 'set() expected to be defined') | ||
assert.ok(Cookies.remove, 'remove() expected to be defined') | ||
}) | ||
|
||
QUnit.test('noop get', (assert) => { | ||
assert.expect(0) | ||
Cookies.get('anything') | ||
}) | ||
|
||
QUnit.test('noop set', (assert) => { | ||
assert.expect(0) | ||
Cookies.set('anything') | ||
}) | ||
|
||
QUnit.test('noop remove', (assert) => { | ||
assert.expect(0) | ||
Cookies.remove('anything') | ||
}) |