Skip to content

Commit 83f8754

Browse files
authored
refactor: remove logModifiedComponents option (#1129)
1 parent 0c07653 commit 83f8754

File tree

9 files changed

+0
-68
lines changed

9 files changed

+0
-68
lines changed

Diff for: docs/api/config.md

-15
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ config.provide['$logger'] = {
7575
}
7676
```
7777

78-
### `logModifiedComponents`
79-
80-
- type: `Boolean`
81-
- default: `true`
82-
83-
Logs warning when extended child components are automatically stubbed. Hides warnings when set to `false`. Unlike other config options, this cannot be set on the mounting options.
84-
85-
Example:
86-
87-
```js
88-
import { config } from '@vue/test-utils'
89-
90-
config.logModifiedComponents = false
91-
```
92-
9378
### `silent`
9479

9580
- type: `Boolean`

Diff for: docs/ja/api/config.md

-15
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,6 @@ config.provide['$logger'] = {
7474
}
7575
```
7676

77-
#### `logModifiedComponents`
78-
79-
- 型: `Boolean`
80-
- デフォルト: `true`
81-
82-
`Vue.extend() で拡張された子コンポーネントは自動的にスタブされます。その時、そのことを警告するログが表示されます。`false` をセットすると警告は表示されません。他の config のオプションと違って、マウティングオプションでセットすることはできません。
83-
84-
例:
85-
86-
```js
87-
import { config } from '@vue/test-utils'
88-
89-
config.logModifiedComponents = false
90-
```
91-
9277
### `silent`
9378

9479
- 型: `Boolean`

Diff for: docs/ru/api/config.md

-15
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ config.provide['$logger'] = {
7575
}
7676
```
7777

78-
### `logModifiedComponents`
79-
80-
- Тип: `Boolean`
81-
- По умолчанию: `true`
82-
83-
Логирует о предупреждениях, когда для расширенных дочерних компонентов автоматически создаётся заглушка. Скрывает предупреждения, когда установлено значение `false`. В отличие от других опций конфигурации, это невозможно установить в настройках монтирования.
84-
85-
Пример:
86-
87-
```js
88-
import { config } from '@vue/test-utils'
89-
90-
config.logModifiedComponents = false
91-
```
92-
9378
### `silent`
9479

9580
- Тип: `Boolean`

Diff for: docs/zh/api/config.md

-15
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ config.provide['$logger'] = {
7575
}
7676
```
7777

78-
### `logModifiedComponents`
79-
80-
- 类型:`Boolean`
81-
- 默认值:`true`
82-
83-
当被展开的子元素被自动化存根的时候记录下告警日志。设置为 `false` 时则会隐藏告警日志。和其它配置选项不同的是,它不能设置在挂载选项上。
84-
85-
示例:
86-
87-
```js
88-
import { config } from '@vue/test-utils'
89-
90-
config.logModifiedComponents = false
91-
```
92-
9378
### `silent`
9479

9580
- 类型:`Boolean`

Diff for: flow/options.flow.js

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ declare type Options = {
1313
attrs?: { [key: string]: string },
1414
listeners?: { [key: string]: Function | Array<Function> },
1515
parentComponent?: Object,
16-
logModifiedComponents?: boolean,
1716
sync?: boolean,
1817
shouldProxy?: boolean
1918
}
@@ -32,7 +31,6 @@ declare type NormalizedOptions = {
3231
attrs?: { [key: string]: string },
3332
listeners?: { [key: string]: Function | Array<Function> },
3433
parentComponent?: Object,
35-
logModifiedComponents?: boolean,
3634
sync: boolean,
3735
shouldProxy?: boolean
3836
}

Diff for: packages/test-utils/src/config.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ export default {
33
mocks: {},
44
methods: {},
55
provide: {},
6-
logModifiedComponents: true,
76
silent: true
87
}

Diff for: packages/test-utils/types/index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ interface VueTestUtilsConfigOptions {
149149
mocks?: Record<string, any>
150150
methods?: Record<string, Function>
151151
provide?: Record<string, any>,
152-
logModifiedComponents?: Boolean
153152
silent?: Boolean
154153
}
155154

Diff for: packages/test-utils/types/test/mount.ts

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ config.provide = {
100100
config.provide['foo'] = {
101101
bar: {}
102102
}
103-
config.logModifiedComponents = true
104103
config.silent = true
105104

106105
// Check we can use default export

Diff for: test/specs/config.spec.js

-3
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,16 @@ import {
1111
describeWithShallowAndMount('config', mountingMethod => {
1212
const sandbox = sinon.createSandbox()
1313
let configStubsSave
14-
let configLogSave
1514
let configSilentSave
1615

1716
beforeEach(() => {
1817
configStubsSave = config.stubs
19-
configLogSave = config.logModifiedComponents
2018
configSilentSave = config.silent
2119
sandbox.stub(console, 'error').callThrough()
2220
})
2321

2422
afterEach(() => {
2523
config.stubs = configStubsSave
26-
config.logModifiedComponents = configLogSave
2724
config.silent = configSilentSave
2825
sandbox.reset()
2926
sandbox.restore()

0 commit comments

Comments
 (0)