You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<divalign="center">
2
2
<h1>vue-testing-library</h1>
3
3
4
-
<p>Lightweight adapter allowing <ahref="https://github.com/kentcdodds/dom-testing-library/">dom-testing-library</a> to be used to test <ahref="https://github.com/vuejs/vue">Vue.js</a> components built on top of <ahref="https://github.com/vuejs/vue-test-utils">@vue/test-utils</a></p>
4
+
<p>Lightweight adapter allowing <ahref="https://github.com/testing-library/dom-testing-library/">dom-testing-library</a> to be used to test <ahref="https://github.com/vuejs/vue">Vue.js</a> components built on top of <ahref="https://github.com/vuejs/vue-test-utils">@vue/test-utils</a></p>
5
5
6
6
</div>
7
7
@@ -16,7 +16,7 @@
16
16
17
17
## This library
18
18
19
-
The `vue-testing-library` is a an adapter that enables Vue testing using the framework-agnostic DOM testing library `dom-testing-library`
19
+
The `vue-testing-library` is an adapter that enables Vue testing using the framework-agnostic DOM testing library `dom-testing-library`
The `render` function takes up to 3 parameters and returns an object with some helper methods
115
+
The `render` function takes up to 3 parameters and returns an object with some helper methods.
116
116
117
117
1. Component - the Vue component to be tested.
118
118
2. RenderOptions - an object containing additional information to be passed to @vue/test-utils mount. This can be:
119
-
* store - The object definition of a Vuex store, if present `render` will configure a Vuex store and pass to mount.
120
-
* routes - A set of routes, if present render will configure VueRouter and pass to mount.
119
+
* store - The object definition of a Vuex store. If present,`render` will configure a Vuex store and pass to mount.
120
+
* routes - A set of routes. If present, render will configure VueRouter and pass to mount.
121
121
All additional render options are passed to the vue-test-utils mount function in its options.
122
122
3. configurationCb - A callback to be called passing the Vue instance when created, plus the store and router if specified. This allows 3rd party plugins to be installed prior to mount.
123
123
124
124
### fireEvent
125
125
126
-
Lightweight wrapper around DOM element events and methods. Will call wait, so can be awaited to allow effects to propagate.
126
+
Lightweight wrapper around DOM element events and methods. Will call `wait`, so can be awaited to allow effects to propagate.
Waiting can be very important in Vue components, @vue/test-utils has succeeded in making the majority of updates happen
136
-
synchronously however there are occasions when wait will allow the DOM to update. For example, see [`here`](https://github.com/testing-library/vue-testing-library/tree/master/tests/__tests__/validate-plugin.js)
136
+
synchronously however there are occasions when `wait` will allow the DOM to update. For example, see [`here`](https://github.com/testing-library/vue-testing-library/tree/master/tests/__tests__/stopwatch.js)
0 commit comments