Skip to content

Commit 3a96a3d

Browse files
authored
feat(browser): introduce expect.dom method and bundle jest-dom matchers with @vitest/browser (#5910)
1 parent 51c04e2 commit 3a96a3d

File tree

16 files changed

+1284
-95
lines changed

16 files changed

+1284
-95
lines changed

Diff for: docs/config/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ browser-like environment through either [`jsdom`](https://github.com/jsdom/jsdom
407407
or [`happy-dom`](https://github.com/capricorn86/happy-dom) instead.
408408
If you are building edge functions, you can use [`edge-runtime`](https://edge-runtime.vercel.app/packages/vm) environment
409409

410+
::: tip
411+
You can also use [Browser Mode](/guide/browser) to run integration or unit tests in the browser without mocking the environment.
412+
:::
413+
410414
By adding a `@vitest-environment` docblock or comment at the top of the file,
411415
you can specify another environment to be used for all tests in that file:
412416

Diff for: docs/guide/browser.md

+359-90
Large diffs are not rendered by default.

Diff for: eslint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default antfu(
1212
'**/bench.json',
1313
'**/fixtures',
1414
'**/assets/**',
15+
'**/*.d.ts',
1516
'**/*.timestamp-*',
1617
'test/core/src/self',
1718
'test/cache/cache/.vitest-base/results.json',

0 commit comments

Comments
 (0)