Skip to content

Commit f5d0966

Browse files
This is just tests if js-cookie can be loaded in a commonjs environment
This file does not represent a test related to node. It uses node as a container for testing the commonjs module pattern.
1 parent 4087398 commit f5d0966

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = function (grunt) {
3737
},
3838
},
3939
nodeunit: {
40-
all: 'test/node.js'
40+
all: 'test/commonjs.js'
4141
},
4242
jshint: {
4343
options: {

test/commonjs.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*jshint node:true */
2+
exports.commonjs = {
3+
should_load_js_cookie: function (test) {
4+
test.expect(1);
5+
var Cookies = require('../src/js.cookie');
6+
test.ok(!!Cookies.get, 'should load the Cookies API');
7+
test.done();
8+
}
9+
};

test/node.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)