index.js 436 B

123456789
  1. // require all test files (files that ends with .spec.js)
  2. const testsContext = require.context('./specs', true, /\.spec$/)
  3. testsContext.keys().forEach(testsContext)
  4. // require all src files except main.js for coverage.
  5. // you can also change this to match only the subset of files that
  6. // you want coverage for.
  7. // const srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/)
  8. // srcContext.keys().forEach(srcContext)