Add sinon to devDeps for mocking
This commit is contained in:
parent
33d8d0fd11
commit
c38d41036e
|
@ -29,6 +29,8 @@
|
||||||
"afterEach": true,
|
"afterEach": true,
|
||||||
"escape": true,
|
"escape": true,
|
||||||
"unescape": true,
|
"unescape": true,
|
||||||
"postMessage": true
|
"postMessage": true,
|
||||||
|
"resolves": true,
|
||||||
|
"rejects": true
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -55,6 +55,7 @@
|
||||||
"istanbul": "~0.4.1",
|
"istanbul": "~0.4.1",
|
||||||
"mocha": "~2.3.4",
|
"mocha": "~2.3.4",
|
||||||
"rusha": "^0.8.3",
|
"rusha": "^0.8.3",
|
||||||
|
"sinon": "^1.17.3",
|
||||||
"whatwg-fetch": "~0.11.0",
|
"whatwg-fetch": "~0.11.0",
|
||||||
"zlibjs": "~0.2.0"
|
"zlibjs": "~0.2.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
(typeof window !== 'undefined' ? window : global).resolves = function(val) {
|
||||||
|
return new Promise(function(res) { res(val); });
|
||||||
|
};
|
||||||
|
|
||||||
|
(typeof window !== 'undefined' ? window : global).rejects = function(val) {
|
||||||
|
return new Promise(function(res, rej) { rej(val); });
|
||||||
|
};
|
||||||
|
|
||||||
describe('Unit Tests', function () {
|
describe('Unit Tests', function () {
|
||||||
require('./general');
|
require('./general');
|
||||||
require('./crypto');
|
require('./crypto');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user