forked from js-cookie/js-cookie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.js
29 lines (29 loc) · 832 Bytes
/
node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*jshint node:true */
exports.node = {
should_load_js_cookie: function (test) {
test.expect(1);
var Cookies = require('../src/js.cookie');
test.ok(!!Cookies.get, 'should load the Cookies API');
test.done();
},
should_not_throw_error_for_set_call_in_node: function (test) {
test.expect(0);
var Cookies = require('../src/js.cookie');
Cookies.set('anything');
Cookies.set('anything', { path: '' });
test.done();
},
should_not_throw_error_for_get_call_in_node: function (test) {
test.expect(0);
var Cookies = require('../src/js.cookie');
Cookies.get('anything');
test.done();
},
should_not_throw_error_for_remove_call_in_node: function (test) {
test.expect(0);
var Cookies = require('../src/js.cookie');
Cookies.remove('anything');
Cookies.remove('anything', { path: '' });
test.done();
}
};