forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
27 lines (22 loc) · 821 Bytes
/
index.js
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
import 'es5-shim';
beforeEach(() => {
sinon.stub(console, 'error');
});
afterEach(function checkNoUnexpectedWarnings() {
if (typeof console.error.restore === 'function') {
assert(!console.error.called, () => {
return `${console.error.getCall(0).args[0]} \nIn '${this.currentTest.fullTitle()}'`;
});
console.error.restore();
}
});
describe('Process environment for tests', () => {
it('Should be development for React console warnings', () => {
assert.equal(process.env.NODE_ENV, 'development');
});
});
// Ensure all files in src folder are loaded for proper code coverage analysis
const srcContext = require.context('../src', true, /.*\.js$/);
srcContext.keys().forEach(srcContext);
const testsContext = require.context('.', true, /Spec$/);
testsContext.keys().forEach(testsContext);