Skip to content

Commit

Permalink
Add chai promise plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ediblecode committed Oct 5, 2016
1 parent 509eead commit 69fdf00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"babel-polyfill": "^6.13.0",
"babel-preset-es2015": "^6.9.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chalk": "^1.1.3",
"chroma-js": "^1.1.1",
"compression": "^1.6.2",
Expand Down
8 changes: 6 additions & 2 deletions test/_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ global.chai = require("chai");
global.should = require("chai").should();
global.AssertionError = require("chai").AssertionError;

// Promises - see http://chaijs.com/plugins/chai-as-promised/
chai.use(require("chai-as-promised"));

// Use sinon for spying etc
global.sinon = require("sinon");
var sinonChai = require("sinon-chai");
global.chai.use(sinonChai);
global.chai.use(require("sinon-chai"));

// Setup jsdom for faking dom and jquery
global.document = require("jsdom").jsdom("<html><head></head><body></body></html>");
global.window = document.defaultView;
global.jQuery = global.$ = require("jquery");

global.PRODUCTION = false;

0 comments on commit 69fdf00

Please sign in to comment.