1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

exclude router/index.js from coverage

This commit is contained in:
lana-k
2021-02-28 21:27:10 +01:00
parent 43cfc8d815
commit 46757bd5ef

View File

@@ -13,8 +13,9 @@ const testsContext = require.context('./tests/unit', true, /\.spec.js$/)
// https://www.npmjs.com/package/require-context#context-api // https://www.npmjs.com/package/require-context#context-api
testsContext.keys().forEach(testsContext) testsContext.keys().forEach(testsContext)
// require all src files except main.js for coverage. // require all src files except main.js and router/index.js for coverage.
// you can also change this to match only the subset of files that // you can also change this to match only the subset of files that
// you want coverage for. // you want coverage for.
const srcContext = require.context('./src', true, /^\.\/(?!main(\.js)?$)/) // We don't include router/index.js to avoid installing VueRouter globally in tests
const srcContext = require.context('./src', true, /^\.\/(?!(main|(router(\/)?(index)?))(\.js)?$)/)
srcContext.keys().forEach(srcContext) srcContext.keys().forEach(srcContext)