Skip to content

Commit 5fa1028

Browse files
committed
docs: add browser environment to common gotchas
1 parent 469b294 commit 5fa1028

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/en/common-gotchas.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Common gotchas
22

3+
## browser environment
4+
5+
Vue Test Utils must be run in a browser environment. This means you can run it in a browser (not recommended), or you can run it in node using a virtual browser, like [JSDOM](https://github.com/tmpvar/jsdom).
6+
7+
[Jest](https://facebook.github.io/jest/docs/en/cli.html) sets up JSDOM automatically, so it is the easiest way for you to run Vue Test Utils in node.
8+
39
## createLocalVue
410

511
`createLocalVue` returns an extended Vue class so you can add mixins, directives, components and plugins without affecting the global Vue class.

0 commit comments

Comments
 (0)