Skip to content

Commit

Permalink
Replace JSDom with Happy DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Oct 3, 2023
1 parent 23ca6af commit 8a95c2b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 348 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@types/react": "*",
"eslint": "^8.26.0",
"eslint-config-wojtekmaj": "^0.9.0",
"happy-dom": "^12.7.0",
"husky": "^8.0.0",
"jsdom": "^21.1.0",
"lint-staged": "^14.0.0",
"prettier": "^3.0.0",
"react": "^18.2.0",
Expand Down
8 changes: 7 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
environment: 'jsdom',
environment: 'happy-dom',
environmentOptions: {
happyDOM: {
width: 1024,
height: 768,
},
},
setupFiles: 'vitest.setup.ts',
watch: false,
},
Expand Down
Loading

0 comments on commit 8a95c2b

Please sign in to comment.