forked from js-cookie/js-cookie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.js
More file actions
28 lines (28 loc) · 843 Bytes
/
Copy pathnode.js
File metadata and controls
28 lines (28 loc) · 843 Bytes
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
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()
}
}