UNPKG

550 BJavaScriptView Raw
1// Polyfill fn.bind() for PhantomJS
2/* eslint-disable no-extend-native */
3Function.prototype.bind = require('function-bind')
4
5// require all test files (files that ends with .spec.js)
6const testsContext = require.context('./specs', true, /\.spec$/)
7testsContext.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.
12const srcContext = require.context('src', true, /^\.\/(?!main(\.js)?$)/)
13srcContext.keys().forEach(srcContext)