Skip to content

Commit

Permalink
fix: Adjust jest config to work with raw queries
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Dec 6, 2023
1 parent aeadb60 commit b93aeaa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
transform: {
'^.+\\.(j|t)s$': 'babel-jest',
'^.+\\.vue$': '@vue/vue2-jest',
'.+\\?raw$': 'jest-raw-loader',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
transformIgnorePatterns: [
Expand All @@ -71,6 +72,7 @@ module.exports = {

moduleNameMapper: {
'\\.(css|scss)$': 'jest-transform-stub',
'\\?raw$': 'jest-raw-loader',
},

snapshotSerializers: [
Expand Down
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"glob": "^10.0.0",
"jest": "^29.0.1",
"jest-environment-jsdom": "29.7.0",
"jest-raw-loader": "^1.0.1",
"jest-serializer-vue": "^3.1.0",
"jest-transform-stub": "^2.0.0",
"resolve-url-loader": "^5.0.0",
Expand Down

0 comments on commit b93aeaa

Please sign in to comment.