We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad8543f commit c0ccf67Copy full SHA for c0ccf67
jest.config.js
@@ -0,0 +1,25 @@
1
+module.exports = {
2
+ "moduleFileExtensions": [
3
+ "js",
4
+ "json",
5
+ // tell Jest to handle *.vue files
6
+ "vue"
7
+ ],
8
+ "transform": {
9
+ // process js with babel-jest
10
+ "^.+\\.js$": "<rootDir>/node_modules/babel-jest",
11
+ // process *.vue files with vue-jest
12
+ ".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
13
+ },
14
+ // support the same @ -> src alias mapping in source code
15
+ "moduleNameMapper": {
16
+ "^@/(.*)$": "<rootDir>/src/$1",
17
+ '../api': '<rootDir>/src/api/__mocks__/fake-api.js'
18
19
+ // serializer for snapshots
20
+ "snapshotSerializers": [
21
+ "<rootDir>/node_modules/jest-serializer-vue"
22
23
+ "setupTestFrameworkScriptFile": "<rootDir>/src/jest-setup.js"
24
+
25
+}
0 commit comments