-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathjest.config.js
More file actions
20 lines (20 loc) · 746 Bytes
/
Copy pathjest.config.js
File metadata and controls
20 lines (20 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module.exports = {
// Where are your vue tests located?
roots: ["<rootDir>/tests/Vue"],
// vue: transform vue with vue-jest to make jest understand Vue's syntax
// js: transform js files with babel, we can now use import statements in tests
transform: {
".*\\.(vue)$": "@vue/vue3-jest",
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
},
// (optional) with that you can import your components like
// "import Counter from '@/Counter.vue'"
// (no need for a full path)
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/resources/js/$1",
},
testEnvironment: "jest-environment-jsdom",
testEnvironmentOptions: {
customExportConditions: ["node", "node-addons"],
},
};