index.js 556 B

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