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: docs/api/index.md
+43-6Lines changed: 43 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -798,9 +798,7 @@ Finds a Vue Component instance and returns a `VueWrapper` if one is found, other
798
798
799
799
```vue
800
800
<template>
801
-
<div class="foo">
802
-
Foo
803
-
</div>
801
+
<div class="foo">Foo</div>
804
802
</template>
805
803
806
804
<script>
@@ -924,9 +922,7 @@ Similar to `findComponent`, `getComponent` looks for a Vue Component instance an
924
922
925
923
```vue
926
924
<template>
927
-
<div class="foo">
928
-
Foo
929
-
</div>
925
+
<div class="foo">Foo</div>
930
926
</template>
931
927
932
928
<script>
@@ -1274,3 +1270,44 @@ test('unmount', () => {
1274
1270
### `vm`
1275
1271
1276
1272
This is the `Vue` instance. You can access all of the [instance methods and properties of a vm](https://v3.vuejs.org/api/instance-properties.html) with `wrapper.vm`. This only exists on `VueWrapper`.
1273
+
1274
+
## Global Config
1275
+
1276
+
### `config.global`
1277
+
1278
+
Instead of configuring global mounting options on a per-test basis, you can configure them globally. These will be used by default every time you `mount` a component. You can override the defaults by via mounting options.
1279
+
1280
+
An example might be globally mocking the `$t` variable from vue-i18n, globally stubbing out a component, or registering a global component:
0 commit comments