@@ -20,9 +20,9 @@ When passing `stubs` as an array in the mounting options, `config.stubs` are con
20
20
Example:
21
21
22
22
``` js
23
- import VueTestUtils from ' @vue/test-utils'
23
+ import { config } from ' @vue/test-utils'
24
24
25
- VueTestUtils . config .stubs [' my-component' ] = ' <div />'
25
+ config .stubs [' my-component' ] = ' <div />'
26
26
```
27
27
28
28
### ` mocks `
@@ -35,9 +35,9 @@ Like `stubs`, the values passed to `config.mocks` are used by default. Any value
35
35
Example:
36
36
37
37
``` js
38
- import VueTestUtils from ' @vue/test-utils'
38
+ import { config } from ' @vue/test-utils'
39
39
40
- VueTestUtils . config .mocks [' $store' ] = {
40
+ config .mocks [' $store' ] = {
41
41
state: {
42
42
id: 1
43
43
}
@@ -54,9 +54,9 @@ You can configure default methods using the `config` object. This can be useful
54
54
Example:
55
55
56
56
``` js
57
- import VueTestUtils from ' @vue/test-utils'
57
+ import { config } from ' @vue/test-utils'
58
58
59
- VueTestUtils . config .methods [' errors' ] = () => {
59
+ config .methods [' errors' ] = () => {
60
60
any : () => false
61
61
}
62
62
```
@@ -71,9 +71,9 @@ Like `stubs` or `mocks`, the values passed to `config.provide` are used by defau
71
71
Example:
72
72
73
73
``` js
74
- import VueTestUtils from ' @vue/test-utils'
74
+ import { config } from ' @vue/test-utils'
75
75
76
- VueTestUtils . config .provide [' $logger' ] = {
76
+ config .provide [' $logger' ] = {
77
77
log : (... args ) => {
78
78
console .log (... args)
79
79
}
@@ -90,9 +90,9 @@ Logs warning when extended child components are automatically stubbed. Hides war
90
90
Example:
91
91
92
92
``` js
93
- import VueTestUtils from ' @vue/test-utils'
93
+ import { config } from ' @vue/test-utils'
94
94
95
- VueTestUtils . config .logModifiedComponents = false
95
+ config .logModifiedComponents = false
96
96
```
97
97
98
98
### ` silent `
@@ -105,7 +105,7 @@ It suppresses warnings triggered by Vue while mutating component's observables (
105
105
Example:
106
106
107
107
``` js
108
- import VueTestUtils from ' @vue/test-utils'
108
+ import { config } from ' @vue/test-utils'
109
109
110
- VueTestUtils . config .silent = false
110
+ config .silent = false
111
111
```
0 commit comments