Skip to content

Commit

Permalink
Jest testing (#372)
Browse files Browse the repository at this point in the history
* Updated webpack & bable to latest

* Added missing packages

* Setting up jest tests
  • Loading branch information
euvl authored Dec 6, 2018
1 parent 07822e0 commit b9f4ee0
Show file tree
Hide file tree
Showing 8 changed files with 2,919 additions and 2,490 deletions.
16 changes: 7 additions & 9 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
module.exports = function (babel) {
module.exports = function(babel) {
babel.cache(true);

return {
"presets": ["@babel/preset-env"],
"comments": false,
"plugins": [
"@babel/plugin-proposal-object-rest-spread"
]
}
}
presets: ["@babel/preset-env"],
comments: false,
plugins: ["@babel/plugin-proposal-object-rest-spread"]
};
};
16 changes: 16 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
"moduleFileExtensions": [
"js",
"vue"
],
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/src/$1"
},
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
},
"snapshotSerializers": [
"<rootDir>/node_modules/jest-serializer-vue"
]
}
Loading

0 comments on commit b9f4ee0

Please sign in to comment.