Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Centralise test setup - Closes #589
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Aug 18, 2017
1 parent 9d0f20d commit 890cbac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
devDependencies: [
"./src/**/*.test.js",
"./features/*/*.js",
"./src/**/stories.js"
"./src/**/stories.js",
"./src/tests.js"
]
}
],
Expand Down
9 changes: 9 additions & 0 deletions src/tests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import chai from 'chai';
import sinonChai from 'sinon-chai';
import chaiEnzyme from 'chai-enzyme';
import chaiAsPromised from 'chai-as-promised';

chai.use(sinonChai);
chai.use(chaiEnzyme());
chai.use(chaiAsPromised);

// load all tests into one bundle
const testsContext = require.context('.', true, /\.test\.js$/);
testsContext.keys().forEach(testsContext);

0 comments on commit 890cbac

Please sign in to comment.