Skip to content

Commit 18e279a

Browse files
committed
(docs): refer to Vue Test Utils correctly
1 parent 47de198 commit 18e279a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/usage-without-a-build-step-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Usage Without a Build Step
22

3-
While it is common to build Vue applications using tools [Webpack](https://jestjs.io/) to bundle the application, `vue-loader` to leverage Single File Components, and [Jest](https://jestjs.io/) to write expressive tests, it is possible to use `vue-test-utils` with much less. The minimal requirements for `vue-test-utils`, aside from the library itself are:
3+
While it is common to build Vue applications using tools [Webpack](https://jestjs.io/) to bundle the application, `vue-loader` to leverage Single File Components, and [Jest](https://jestjs.io/) to write expressive tests, it is possible to use Vue Test Utils with much less. The minimal requirements for Vue Test Utils, aside from the library itself are:
44

55
- Vue
66
- vue-template-compiler
@@ -28,7 +28,7 @@ const Vue = require('vue')
2828
const VueTestUtils = require('@vue/test-utils')
2929
```
3030

31-
As the comment says, `jsdom-global` must be required before `@vue/test-utils`. This is because `vue-test-utils` expects a DOM to be present to render the Vue components. If you are running the tests in a real browser, you will not need `jsdom` at all. `Vue` must also be required before `@vue/test-utils` for obvious reasons - `vue-test-utils` expects to be available, as well. We also require `assert` from the node standard library. Normally we would use the matchers provided by a test runner, often in the format of an `expect(...).toEqual(...)` assertion, but `assert` will serve this purpose for this example.
31+
As the comment says, `jsdom-global` must be required before `@vue/test-utils`. This is because Vue Test Utils expects a DOM to be present to render the Vue components. If you are running the tests in a real browser, you will not need `jsdom` at all. `Vue` must also be required before `@vue/test-utils` for obvious reasons - Vue Test Utils expects to be available, as well. We also require `assert` from the node standard library. Normally we would use the matchers provided by a test runner, often in the format of an `expect(...).toEqual(...)` assertion, but `assert` will serve this purpose for this example.
3232

3333
## Writing a Test
3434

0 commit comments

Comments
 (0)