Skip to content

Commit

Permalink
Simplify jest test dependencies (#962)
Browse files Browse the repository at this point in the history
* Use happy-dom instead of jsdom

It is faster and has fewer dependencies

* Remove unused js testing packages
  • Loading branch information
sandbergja authored Nov 21, 2023
1 parent a443ec3 commit 00f04be
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 338 deletions.
12 changes: 2 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"private": true,
"dependencies": {
"@rails/ujs": "6.1.7-6",
"jest-environment-jsdom": "^28.1.2",
"lux-design-system": "~3.0.1",
"vue": "^2.6.10",
"vue-loader": "^15.7.0",
Expand All @@ -29,8 +28,7 @@
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.1.0",
"jest": "^28.1.2",
"jest-canvas-mock": "^1.1.0",
"jest-serializer-vue": "^2.0.2",
"@happy-dom/jest-environment": "^12.10.3",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^9.3.0",
"sass": "^1.69.5",
Expand All @@ -47,7 +45,7 @@
"node_modules",
"app/javascript"
],
"testEnvironment": "jsdom",
"testEnvironment": "@happy-dom/jest-environment",
"moduleNameMapper": {
"^@/(.*)$": "app/javascript/$1"
},
Expand All @@ -60,12 +58,6 @@
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
},
"snapshotSerializers": [
"<rootDir>/node_modules/jest-serializer-vue"
],
"setupFiles": [
"jest-canvas-mock"
],
"setupFilesAfterEnv": [
"./app/javascript/test/setup.js"
]
Expand Down
Loading

0 comments on commit 00f04be

Please sign in to comment.