github.com/titpetric/pendulum@v0.1.180207-1512.0.20180514135826-1f399445df57/front/src/test/unit/index.js (about) 1 import Vue from 'vue' 2 3 Vue.config.productionTip = false 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)