Skip to content

Commit 37b86b9

Browse files
authored
docs(qwik): add support for happy-dom (#1513)
1 parent 2710fa8 commit 37b86b9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/qwik-testing-library/setup.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ interactions with the DOM.
2323
npm install --save-dev @testing-library/jest-dom @testing-library/user-event
2424
```
2525

26-
Finally, we need a DOM environment to run the tests in. This library was tested
27-
(for now) only with `jsdom` so we recommend using it:
26+
Finally, we need a DOM environment to run the tests in. This library is tested
27+
with both `jsdom` and `happy-dom`:
2828

2929
```bash npm2yarn
3030
npm install --save-dev jsdom
3131
```
32+
or
33+
```bash npm2yarn
34+
npm install --save-dev happy-dom
35+
```
3236

3337
[npm]: https://www.npmjs.com/
3438
[node]: https://nodejs.org
@@ -71,7 +75,7 @@ export default defineConfig(configEnv =>
7175
},
7276
// configure your test environment
7377
test: {
74-
environment: 'jsdom',
78+
environment: 'jsdom', // or 'happy-dom'
7579
setupFiles: ['./vitest.setup.ts'],
7680
globals: true,
7781
},

0 commit comments

Comments
 (0)