index.js 393 B

123456789
  1. // require all test files
  2. const testsContext = require.context('./specs', true, /.*/)
  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)