1 | // Polyfill fn.bind() for PhantomJS
|
2 | /* eslint-disable no-extend-native */
|
3 | Function.prototype.bind = require('function-bind')
|
4 |
|
5 | // require all test files (files that ends with .spec.js)
|
6 | const testsContext = require.context('./specs', true, /\.spec$/)
|
7 | testsContext.keys().forEach(testsContext)
|
8 |
|
9 | // require all src files except main.js for coverage.
|
10 | // you can also change this to match only the subset of files that
|
11 | // you want coverage for.
|
12 | const srcContext = require.context('src', true, /^\.\/(?!main(\.js)?$)/)
|
13 | srcContext.keys().forEach(srcContext)
|