Skip to content

Commit

Permalink
trying to get jest to work
Browse files Browse the repository at this point in the history
  • Loading branch information
pwolanin committed Sep 25, 2024
1 parent 281a013 commit 2f919fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}]
],
"plugins": [
'@babel/plugin-transform-modules-commonjs',
"transform-object-rest-spread"
]
}
14 changes: 14 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
"presets": [
["@babel/preset-env", {
"useBuiltIns": "entry",
"targets": {
"node": "current"
}
}]
],
"plugins": [
'@babel/plugin-transform-modules-commonjs',
"transform-object-rest-spread"
]
}
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
"json",
"vue"
],
transformIgnorePatterns: ['node_modules/(?!(nanoid)/)'],
transform: {
".*\\.(vue)$": "@vue/vue3-jest",
"^.+\\.js$": "babel-jest"
Expand All @@ -31,4 +32,4 @@ module.exports = {
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/tests/testMocks.js'
}
}
}

0 comments on commit 2f919fe

Please sign in to comment.