Skip to content

Commit

Permalink
Moving the configuration back to a jest.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Dec 9, 2019
1 parent 25af11d commit 27c0483
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
28 changes: 28 additions & 0 deletions assets/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const path = require("path");

module.exports = {
modulePaths: ["<rootDir>"],
moduleFileExtensions: ["js", "json", "vue"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/js/$1"
},
transform: {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
},
coverageDirectory: "<rootDir>/js/test/unit/coverage",
collectCoverageFrom: [
"<rootDir>/js/components/**/*.{js,vue}",
"!<rootDir>/js/components/_components.js",
"!<rootDir>/js/components/_lux-elements-used.js",
"!<rootDir>/node_modules/**"
],
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100
}
}
};
32 changes: 0 additions & 32 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,5 @@
"vue-template-compiler": "^2.6.10",
"webpack": "4.4.0",
"webpack-cli": "^3.3.2"
},
"jest": {
"modulePaths": [
"<rootDir>"
],
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/js/$1"
},
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
},
"coverageDirectory": "<rootDir>/js/test/unit/coverage",
"collectCoverageFrom": [
"<rootDir>/js/components/**/*.{js,vue}",
"!<rootDir>/js/components/_components.js",
"!<rootDir>/js/components/_lux-elements-used.js",
"!<rootDir>/node_modules/**"
],
"coverageThreshold": {
"global": {
"statements": 100,
"branches": 100,
"functions": 100,
"lines": 100
}
}
}
}

0 comments on commit 27c0483

Please sign in to comment.