-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Describe the bug
demo online: https://stackblitz.com/edit/vitest-dev-vitest-gnawnk?file=vite.config.ts&initialPath=__vitest__
FAIL test/suite.test.ts > my vue component > should render
ReferenceError: document is not defined
❯ Proxy.mount node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:7757:14
❯ eval test/suite.test.ts:7:20
5| describe('my vue component', () => {
6| it('should render', () => {
7| const wrapper = mount(MyComponent);
| ^
8| expect(wrapper.html()).toMatchSnapshot();
9| });Reproduction
No need.
System Info
No need.Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
peterroe, ckvv, tuzmusic, MatthiasGwiozda and foxyseta
Metadata
Metadata
Assignees
Labels
No labels