Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/vue-test-utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: vuejs/vue-test-utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Loading
Showing with 19,750 additions and 794 deletions.
  1. +0 −12 .circleci/config.yml
  2. +1 −1 .eslintignore
  3. +1 −0 .gitignore
  4. +1 −1 .nvmrc
  5. +3 −1 .prettierrc.json
  6. +5 −5 README.md
  7. +50 −11 docs/.vuepress/config.js
  8. +1 −4 docs/.vuepress/theme/Layout.vue
  9. +1 −1 docs/README.md
  10. +3 −3 docs/api/options.md
  11. +1 −1 docs/api/wrapper/findAllComponents.md
  12. +2 −2 docs/api/wrapper/findComponent.md
  13. +1 −1 docs/fr/README.md
  14. +1 −1 docs/fr/api/options.md
  15. +17 −0 docs/fr/api/wrapper-array/is.md
  16. +1 −1 docs/fr/guides/common-tips.md
  17. +1 −1 docs/fr/guides/dom-events.md
  18. +1 −1 docs/fr/installation/using-other-test-runners.md
  19. +1 −1 docs/guides/common-tips.md
  20. +1 −1 docs/guides/dom-events.md
  21. +1 −1 docs/installation/using-other-test-runners.md
  22. +2 −2 docs/installation/using-with-jest.md
  23. +1 −1 docs/ja/api/options.md
  24. +14 −0 docs/ja/api/wrapper-array/is.md
  25. +4 −0 docs/ja/guides/common-tips.md
  26. +1 −1 docs/ja/guides/dom-events.md
  27. +1 −1 docs/ja/guides/getting-started.md
  28. +2 −2 docs/ja/installation/testing-single-file-components-with-karma.md
  29. +93 −0 docs/pt/README.md
  30. +11 −0 docs/pt/api/README.md
  31. +5 −0 docs/pt/api/components/README.md
  32. +20 −0 docs/pt/api/components/RouterLinkStub.md
  33. +114 −0 docs/pt/api/config.md
  34. +59 −0 docs/pt/api/createLocalVue.md
  35. +25 −0 docs/pt/api/createWrapper.md
  36. +55 −0 docs/pt/api/enableAutoDestroy.md
  37. +137 −0 docs/pt/api/mount.md
  38. +471 −0 docs/pt/api/options.md
  39. +103 −0 docs/pt/api/render.md
  40. +101 −0 docs/pt/api/renderToString.md
  41. +61 −0 docs/pt/api/selectors.md
  42. +118 −0 docs/pt/api/shallowMount.md
  43. +30 −0 docs/pt/api/wrapper-array/README.md
  44. +26 −0 docs/pt/api/wrapper-array/at.md
  45. +24 −0 docs/pt/api/wrapper-array/contains.md
  46. +16 −0 docs/pt/api/wrapper-array/destroy.md
  47. +18 −0 docs/pt/api/wrapper-array/exists.md
  48. +26 −0 docs/pt/api/wrapper-array/filter.md
  49. +20 −0 docs/pt/api/wrapper-array/is.md
  50. +24 −0 docs/pt/api/wrapper-array/isEmpty.md
  51. +21 −0 docs/pt/api/wrapper-array/isVisible.md
  52. +25 −0 docs/pt/api/wrapper-array/isVueInstance.md
  53. +41 −0 docs/pt/api/wrapper-array/setChecked.md
  54. +24 −0 docs/pt/api/wrapper-array/setData.md
  55. +36 −0 docs/pt/api/wrapper-array/setMethods.md
  56. +24 −0 docs/pt/api/wrapper-array/setProps.md
  57. +40 −0 docs/pt/api/wrapper-array/setValue.md
  58. +29 −0 docs/pt/api/wrapper-array/trigger.md
  59. +57 −0 docs/pt/api/wrapper/README.md
  60. +20 −0 docs/pt/api/wrapper/attributes.md
  61. +22 −0 docs/pt/api/wrapper/classes.md
  62. +27 −0 docs/pt/api/wrapper/contains.md
  63. +23 −0 docs/pt/api/wrapper/destroy.md
  64. +61 −0 docs/pt/api/wrapper/emitted.md
  65. +34 −0 docs/pt/api/wrapper/emittedByOrder.md
  66. +18 −0 docs/pt/api/wrapper/exists.md
  67. +43 −0 docs/pt/api/wrapper/find.md
  68. +32 −0 docs/pt/api/wrapper/findAll.md
  69. +27 −0 docs/pt/api/wrapper/findAllComponents.md
  70. +54 −0 docs/pt/api/wrapper/findComponent.md
  71. +24 −0 docs/pt/api/wrapper/get.md
  72. +24 −0 docs/pt/api/wrapper/getComponent.md
  73. +16 −0 docs/pt/api/wrapper/html.md
  74. +36 −0 docs/pt/api/wrapper/is.md
  75. +23 −0 docs/pt/api/wrapper/isEmpty.md
  76. +20 −0 docs/pt/api/wrapper/isVisible.md
  77. +23 −0 docs/pt/api/wrapper/isVueInstance.md
  78. +21 −0 docs/pt/api/wrapper/name.md
  79. +47 −0 docs/pt/api/wrapper/overview.md
  80. +26 −0 docs/pt/api/wrapper/props.md
  81. +35 −0 docs/pt/api/wrapper/setChecked.md
  82. +26 −0 docs/pt/api/wrapper/setData.md
  83. +34 −0 docs/pt/api/wrapper/setMethods.md
  84. +53 −0 docs/pt/api/wrapper/setProps.md
  85. +31 −0 docs/pt/api/wrapper/setSelected.md
  86. +53 −0 docs/pt/api/wrapper/setValue.md
  87. +15 −0 docs/pt/api/wrapper/text.md
  88. +57 −0 docs/pt/api/wrapper/trigger.md
  89. +9 −0 docs/pt/guides/README.md
  90. +345 −0 docs/pt/guides/common-tips.md
  91. +215 −0 docs/pt/guides/dom-events.md
  92. +76 −0 docs/pt/guides/getting-started.md
  93. +143 −0 docs/pt/guides/testing-async-components.md
  94. +21 −0 docs/pt/guides/useful-libraries-for-testing.md
  95. +157 −0 docs/pt/guides/using-with-typescript.md
  96. +86 −0 docs/pt/guides/using-with-vue-router.md
  97. +393 −0 docs/pt/guides/using-with-vuex.md
  98. +5 −0 docs/pt/installation/README.md
  99. +3 −0 docs/pt/installation/semantic-versioning.md
  100. +60 −0 docs/pt/installation/using-other-test-runners.md
  101. +119 −0 docs/pt/installation/using-with-jest.md
  102. +84 −0 docs/pt/upgrading-to-v1/README.md
  103. +1 −1 docs/ru/README.md
  104. +1 −1 docs/ru/api/options.md
  105. +1 −1 docs/ru/guides/dom-events.md
  106. +1 −1 docs/ru/guides/getting-started.md
  107. +2 −2 docs/ru/installation/testing-single-file-components-with-karma.md
  108. +1 −1 docs/zh/README.md
  109. +1 −1 docs/zh/api/mount.md
  110. +1 −1 docs/zh/api/options.md
  111. +4 −4 docs/zh/api/render.md
  112. +14 −0 docs/zh/api/wrapper-array/is.md
  113. +1 −1 docs/zh/api/wrapper/README.md
  114. +1 −1 docs/zh/api/wrapper/emitted.md
  115. +1 −1 docs/zh/api/wrapper/setSelected.md
  116. +1 −1 docs/zh/guides/common-tips.md
  117. +1 −1 docs/zh/guides/dom-events.md
  118. +1 −1 docs/zh/guides/getting-started.md
  119. +1 −1 docs/zh/installation/testing-single-file-components-with-jest.md
  120. +2 −2 docs/zh/installation/testing-single-file-components-with-karma.md
  121. +1 −1 lerna.json
  122. +3 −3 package.json
  123. +2 −2 packages/create-instance/add-mocks.js
  124. +15 −17 packages/create-instance/create-component-stubs.js
  125. +6 −5 packages/create-instance/create-instance.js
  126. +4 −4 packages/create-instance/create-scoped-slots.js
  127. +1 −1 packages/create-instance/log-events.js
  128. +9 −1 packages/create-instance/patch-create-element.js
  129. +79 −69 packages/server-test-utils/dist/vue-server-test-utils.js
  130. +1 −1 packages/server-test-utils/package.json
  131. +3 −3 packages/shared/compile-template.js
  132. +2 −1 packages/shared/create-local-vue.js
  133. +12 −1 packages/shared/is-visible.js
  134. +3 −3 packages/shared/merge-options.js
  135. +2 −2 packages/shared/validate-slots.js
  136. +8 −8 packages/shared/validators.js
  137. +14,142 −0 packages/test-utils/dist/vue-test-utils.esm.js
  138. +79 −69 packages/test-utils/dist/vue-test-utils.iife.js
  139. +79 −69 packages/test-utils/dist/vue-test-utils.js
  140. +79 −69 packages/test-utils/dist/vue-test-utils.umd.js
  141. +10 −1 packages/test-utils/package.json
  142. +9 −0 packages/test-utils/scripts/build.js
  143. +6 −5 packages/test-utils/src/create-dom-event.js
  144. +2 −2 packages/test-utils/src/matches.js
  145. +3 −2 packages/test-utils/src/recursively-set-data.js
  146. +1 −1 packages/test-utils/src/wrapper-array.js
  147. +19 −23 packages/test-utils/src/wrapper.js
  148. +4 −2 packages/test-utils/types/index.d.ts
  149. +2 −5 test/resources/components/component-with-computed.vue
  150. +1 −3 test/resources/components/component-with-transitions.vue
  151. +1 −1 test/resources/components/component-with-watch-immediate.vue
  152. +1 −1 test/resources/components/component-with-watch.vue
  153. +1 −1 test/resources/test-mixin.js
  154. +4 −4 test/resources/utils.js
  155. +2 −2 test/specs/create-local-vue.spec.js
  156. +3 −3 test/specs/mount.spec.js
  157. +6 −7 test/specs/mounting-options/scopedSlots.spec.js
  158. +86 −0 test/specs/mounting-options/stubs.spec.js
  159. +34 −2 test/specs/shallow-mount.spec.js
  160. +7 −13 test/specs/wrapper-array/at.spec.js
  161. +1 −3 test/specs/wrapper-array/attributes.spec.js
  162. +1 −3 test/specs/wrapper-array/classes.spec.js
  163. +4 −4 test/specs/wrapper-array/contains.spec.js
  164. +3 −5 test/specs/wrapper-array/find.spec.js
  165. +3 −5 test/specs/wrapper-array/findAll.spec.js
  166. +3 −5 test/specs/wrapper-array/html.spec.js
  167. +1 −4 test/specs/wrapper-array/is.spec.js
  168. +1 −4 test/specs/wrapper-array/isEmpty.spec.js
  169. +1 −4 test/specs/wrapper-array/isVisible.spec.js
  170. +1 −4 test/specs/wrapper-array/isVueInstance.spec.js
  171. +1 −4 test/specs/wrapper-array/name.spec.js
  172. +3 −5 test/specs/wrapper-array/props.spec.js
  173. +1 −4 test/specs/wrapper-array/setData.spec.js
  174. +1 −4 test/specs/wrapper-array/setProps.spec.js
  175. +1 −4 test/specs/wrapper-array/text.spec.js
  176. +1 −4 test/specs/wrapper-array/trigger.spec.js
  177. +3 −3 test/specs/wrapper/emittedByOrder.spec.js
  178. +4 −14 test/specs/wrapper/find.spec.js
  179. +1 −6 test/specs/wrapper/findAll.spec.js
  180. +15 −0 test/specs/wrapper/isVisible.spec.js
  181. +6 −2 test/specs/wrapper/overview.spec.js
  182. +1 −3 test/specs/wrapper/props.spec.js
  183. +2 −5 test/specs/wrapper/setData.spec.js
  184. +5 −8 test/specs/wrapper/setProps.spec.js
  185. +4 −4 test/specs/wrapper/trigger.spec.js
  186. +300 −197 yarn.lock
12 changes: 0 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -60,13 +60,6 @@ jobs:
- run:
name: yarn test
command: yarn test
test_compat:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- *restore_node_modules
- run: yarn test:compat
workflows:
version: 2
install-tests:
@@ -81,8 +74,3 @@ workflows:
- test:
requires:
- install
- test_compat:
requires:
- install
- build_test
- test
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dist
**/dist/**
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
node_modules/
.eslintcache

# Editor files
/.idea
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10
v16
4 changes: 3 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"semi": false,
"singleQuote": true
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vue Test Utils [![Build Status](https://circleci.com/gh/vuejs/vue-test-utils/tree/dev.png?style=shield)](https://circleci.com/gh/vuejs/vue-test-utils)

Vue Test Utils is the official testing library for Vue.js.
Component testing utils for Vue 2.

## Packages

@@ -12,8 +12,8 @@ This repository provides the following two packages:
You can install these packages by the following command.

```
npm install --save-dev @vue/test-utils
npm install --save-dev @vue/server-test-utils
npm install --save-dev @vue/test-utils@1
npm install --save-dev @vue/server-test-utils@1
```

## Peer Dependencies
@@ -26,15 +26,15 @@ npm install --save-dev vue-template-compiler

## Documentation

Refer to the [documentation](https://vue-test-utils.vuejs.org/)
Refer to the [documentation](https://v1.test-utils.vuejs.org/)

## Questions

For questions and support please use the [Discord chat room](https://vue-land.js.org/) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests.

## Issues

Please make sure to read the [Issue Reporting Checklist](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
Please make sure to read the issue reporting requirements before opening an issue. Issues not conforming to the guidelines may be closed immediately.

## Contribution

61 changes: 50 additions & 11 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -24,6 +24,11 @@ module.exports = {
title: 'Vue Test Utils',
lang: 'fr',
description: 'Utilitaires pour tester les composants Vue'
},
'/pt/': {
title: 'Vue Test Utils',
lang: 'pt',
description: 'Utilitários para testes de componentes de Vue'
}
},
plugins: ['@vuepress/pwa'],
@@ -59,8 +64,8 @@ module.exports = {
link: '/guides/',
items: [
{
text: '2.x-beta',
link: 'https://next.vue-test-utils.vuejs.org/guide/'
text: 'v2 (Vue.js 3)',
link: 'https://test-utils.vuejs.org/'
}
]
},
@@ -94,8 +99,8 @@ module.exports = {
link: '/zh/guides/',
items: [
{
text: '2.x-beta',
link: 'https://next.vue-test-utils.vuejs.org/guide/'
text: 'v2 (Vue.js 3)',
link: 'https://test-utils.vuejs.org/'
}
]
}
@@ -125,8 +130,8 @@ module.exports = {
link: '/ja/guides/',
items: [
{
text: '2.x-beta',
link: 'https://next.vue-test-utils.vuejs.org/guide/'
text: 'v2 (Vue.js 3)',
link: 'https://test-utils.vuejs.org/'
}
]
}
@@ -156,8 +161,8 @@ module.exports = {
link: '/ru/guides/',
items: [
{
text: '2.x-beta',
link: 'https://next.vue-test-utils.vuejs.org/guide/'
text: 'v2 (Vue.js 3)',
link: 'https://test-utils.vuejs.org/'
}
]
}
@@ -187,9 +192,8 @@ module.exports = {
link: '/fr/guides/',
items: [
{
text: '2.x-beta',
link:
'https://vuejs.github.io/vue-test-utils-next-docs/guide/introduction.html'
text: 'v2 (Vue.js 3)',
link: 'https://test-utils.vuejs.org/'
}
]
}
@@ -204,6 +208,41 @@ module.exports = {
'/fr/api/options',
'/fr/api/components/'
]
},
'/pt/': {
label: 'Português',
selectText: 'Idiomas',
editLinkText: 'Edite esta página no GitHub',
nav: [
{
text: 'API',
link: '/pt/api/'
},
{
text: 'Guias',
link: '/pt/guides/',
items: [
{
text: '2.x-beta',
link: 'https://next.vue-test-utils.vuejs.org/guide/'
}
]
},
{
text: 'Atualizando para V1',
link: '/pt/upgrading-to-v1/'
}
],
sidebar: [
'/pt/',
'/pt/installation/',
'/pt/guides/',
'/pt/api/',
'/pt/api/wrapper/',
'/pt/api/wrapper-array/',
'/pt/api/options',
'/pt/api/components/'
]
}
}
},
5 changes: 1 addition & 4 deletions docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -9,10 +9,7 @@
</p>
<p>
To read docs for Vue Test Utils for Vue 3,
<a
href="https://next.vue-test-utils.vuejs.org/guide/"
v-text="'click here'"
/>.
<a href="https://test-utils.vuejs.org/" v-text="'click here'" />.
</p>
</div>
</div>
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ This is the documentation for Vue Test Utils v1, which targets Vue 2 and earlier
In short:

- [Vue Test Utils 1](https://github.com/vuejs/vue-test-utils/) targets [Vue 2](https://github.com/vuejs/vue/).
- [Vue Test Utils 2](https://github.com/vuejs/vue-test-utils-next/) targets [Vue 3](https://github.com/vuejs/vue-next/).
- [Vue Test Utils 2](https://github.com/vuejs/test-utils) targets [Vue 3](https://github.com/vuejs/core).

<div class="vueschool"><a href="https://vueschool.io/courses/learn-how-to-test-vuejs-components?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to use Vue Test Utils to test Vue.js Components with Vue School">Learn how to test Vue.js components with Vue School</a></div>

6 changes: 3 additions & 3 deletions docs/api/options.md
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ You can also pass a function that takes the props as an argument:
```js
shallowMount(Component, {
scopedSlots: {
foo: function(props) {
foo: function (props) {
return this.$createElement('div', props.index)
}
}
@@ -317,13 +317,13 @@ const Component = {
let wrapper = mount(Component, {
attachTo: '#root'
})
expect(wrapper.vm.$el.parentNode).to.not.be.null
expect(wrapper.vm.$el.parentNode).not.toBeNull()
wrapper.destroy()

wrapper = mount(Component, {
attachTo: document.getElementById('root')
})
expect(wrapper.vm.$el.parentNode).to.not.be.null
expect(wrapper.vm.$el.parentNode).not.toBeNull()
wrapper.destroy()
```

2 changes: 1 addition & 1 deletion docs/api/wrapper/findAllComponents.md
Original file line number Diff line number Diff line change
@@ -23,5 +23,5 @@ expect(bars).toHaveLength(1)
```

::: warning Usage with CSS selectors
Using `findAllComponents` with CSS selector is subject to same limitations as [findComponent](api/wrapper/findComponent.md)
Using `findAllComponents` with CSS selector is subject to same limitations as [findComponent](./findComponent.md)
:::
4 changes: 2 additions & 2 deletions docs/api/wrapper/findComponent.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ expect(barRef.exists()).toBe(true)
```

::: warning Usage with CSS selectors
Using `findAllComponents` with CSS selector might have confusing behavior
Using `findComponent` with a CSS selector might have confusing behavior

Consider this example:

@@ -50,5 +50,5 @@ const childByCss = wrapper.findComponent('.child')
expect(childByCss.vm.$options.name).toBe('Root') // => still Root
```

The reason for such behavior is that `RootComponent` and `ChildComponent` are sharing same DOM node and only first matching component is included for each unique DOM node
The reason for such behavior is that `RootComponent` and `ChildComponent` are sharing the same DOM node and only the first matching component is returned for each unique DOM node
:::
2 changes: 1 addition & 1 deletion docs/fr/README.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ Voici la documentation de Vue Test Utils v1, qui vise Vue 2 et les versions ant
En bref :

- [Vue Test Utils 1](https://github.com/vuejs/vue-test-utils/) ciblant [Vue 2](https://github.com/vuejs/vue/).
- [Vue Test Utils 2](https://github.com/vuejs/vue-test-utils-next/) ciblant [Vue 3](https://github.com/vuejs/vue-next/).
- [Vue Test Utils 2](https://github.com/vuejs/test-utils) ciblant [Vue 3](https://github.com/vuejs/core).

<div class="vueschool"><a href="https://vueschool.io/courses/learn-how-to-test-vuejs-components?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to use Vue Test Utils to test Vue.js Components with Vue School">Apprenez comment tester les composants de Vue.js avec Vue School</a></div>

2 changes: 1 addition & 1 deletion docs/fr/api/options.md
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ Vous pouvez également passer une fonction qui prend les props comme argument :
```js
shallowMount(Component, {
scopedSlots: {
foo: function(props) {
foo: function (props) {
return this.$createElement('div', props.index)
}
}
17 changes: 17 additions & 0 deletions docs/fr/api/wrapper-array/is.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
## is

::: warning Avertissement de déprédation
L'utilisation de `is` pour affirmer que le nœud DOM est déprécié et sera supprimé.

Considérez un appariement personnalisé tel que ceux fournis dans [jest-dom](https://github.com/testing-library/jest-dom#custom-matchers).
ou pour l'assertion de type d'élément DOM, utilisez native [`Element.tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName) à la place.

Pour conserver ces tests, un remplacement valable pour :

- `is('DOM_SELECTOR')` est une affirmation de `wrapper.wrappers.every(wrapper => wrapper.element.tagName === 'DOM_SELECTOR')`.
- `is('ATTR_NAME')` est une affirmation véridique d `wrapper.wrappers.every(wrapper => wrapper.attributes('ATTR_NAME'))`.
- `is('CLASS_NAME')` est une affirmation véridique d `wrapper.wrappers.every(wrapper => wrapper.classes('CLASS_NAME'))`.

L'affirmation contre la définition du composant n'est pas dépréciée

En cas d'utilisation avec findComponent, accédez à l'élément DOM avec `findComponent(Comp).element`
:::

Affirmer que chaque `Wrapper` dans le noeud DOM `WrapperArray` ou `vm` correspond à [selector](../selectors.md).

- **Arguments:**
2 changes: 1 addition & 1 deletion docs/fr/guides/common-tips.md
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ En pratique, bien que nous appelions et attendions `setData` pour assurer la mis

```js
const transitionStub = () => ({
render: function(h) {
render: function (h) {
return this.$options._renderChildren
}
})
2 changes: 1 addition & 1 deletion docs/fr/guides/dom-events.md
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ Ce composant permet d'incrémenter/décrémenter la quantité à l'aide de diff
},
watch: {
quantity: function(newValue) {
quantity: function (newValue) {
this.$emit('input', newValue)
}
}
2 changes: 1 addition & 1 deletion docs/fr/installation/using-other-test-runners.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ Vous trouverez ci-dessous une configuration de base de Karma pour Vue Test Utils
// karma.conf.js
var webpackConfig = require('./webpack.config.js')

module.exports = function(config) {
module.exports = function (config) {
config.set({
frameworks: ['mocha'],
files: ['test/**/*.spec.js'],
2 changes: 1 addition & 1 deletion docs/guides/common-tips.md
Original file line number Diff line number Diff line change
@@ -223,7 +223,7 @@ In practice, although we are calling and awaiting `setData` to ensure the DOM is

```js
const transitionStub = () => ({
render: function(h) {
render: function (h) {
return this.$options._renderChildren
}
})
2 changes: 1 addition & 1 deletion docs/guides/dom-events.md
Original file line number Diff line number Diff line change
@@ -142,7 +142,7 @@ This component allows to increment/decrement the quantity using various keys.
},
watch: {
quantity: function(newValue) {
quantity: function (newValue) {
this.$emit('input', newValue)
}
}
2 changes: 1 addition & 1 deletion docs/installation/using-other-test-runners.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ Following is a basic Karma config for Vue Test Utils:
// karma.conf.js
var webpackConfig = require('./webpack.config.js')

module.exports = function(config) {
module.exports = function (config) {
config.set({
frameworks: ['mocha'],
files: ['test/**/*.spec.js'],
4 changes: 2 additions & 2 deletions docs/installation/using-with-jest.md
Original file line number Diff line number Diff line change
@@ -17,15 +17,15 @@ The plugin pulls all required dependencies (including jest), creates a `jest.con
After that, all you need to do is to install Vue Test Utils.

```bash
$ npm install --save-dev @vue/test-utils
$ npm install --save-dev @vue/test-utils@legacy
```

### Manual installation

After setting up Jest, the first thing to do is to install Vue Test Utils and [`vue-jest`](https://github.com/vuejs/vue-jest) to process Single-File Components:

```bash
$ npm install --save-dev @vue/test-utils vue-jest
$ npm install --save-dev @vue/test-utils@legacy vue-jest
```

Then, you need to tell Jest to transform `.vue` files using `vue-jest`. You can do so by adding the following configuration in `package.json` or in a standalone [Jest config file](https://jestjs.io/docs/en/configuration):
2 changes: 1 addition & 1 deletion docs/ja/api/options.md
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ props を引数に取る関数を渡すことができます。
```js
shallowMount(Component, {
scopedSlots: {
foo: function(props) {
foo: function (props) {
return this.$createElement('div', props.index)
}
}
Loading