Skip to content

Commit b9f4ee0

Browse files
authored
Jest testing (#372)
* Updated webpack & bable to latest * Added missing packages * Setting up jest tests
1 parent 07822e0 commit b9f4ee0

8 files changed

+2919
-2490
lines changed

babel.config.js

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
module.exports = function (babel) {
1+
module.exports = function(babel) {
22
babel.cache(true);
3-
3+
44
return {
5-
"presets": ["@babel/preset-env"],
6-
"comments": false,
7-
"plugins": [
8-
"@babel/plugin-proposal-object-rest-spread"
9-
]
10-
}
11-
}
5+
presets: ["@babel/preset-env"],
6+
comments: false,
7+
plugins: ["@babel/plugin-proposal-object-rest-spread"]
8+
};
9+
};

jest.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
"moduleFileExtensions": [
3+
"js",
4+
"vue"
5+
],
6+
"moduleNameMapper": {
7+
"^@/(.*)$": "<rootDir>/src/$1"
8+
},
9+
"transform": {
10+
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
11+
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
12+
},
13+
"snapshotSerializers": [
14+
"<rootDir>/node_modules/jest-serializer-vue"
15+
]
16+
}

0 commit comments

Comments
 (0)