Skip to content

Commit 0563d1e

Browse files
committed
options.provide should allow symbol keys
1 parent 9627a80 commit 0563d1e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/test-utils/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export interface VueTestUtilsConfigOptions {
180180
stubs: Record<string, Component | boolean | string>
181181
mocks: Record<string, any>
182182
methods: Record<string, Function>
183-
provide?: Record<string, any>,
183+
provide?: Record<string | symbol, any>,
184184
showDeprecationWarnings?: boolean
185185
deprecationWarningHandler?: Function
186186
}

packages/test-utils/types/test/mount.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ config.stubs = {
9999
}
100100
config.stubs['quuux'] = true
101101
config.mocks = {
102-
foo: 'bar',
102+
foo: 'bar'
103103
}
104104
config.mocks['foo'] = {
105105
bar: 'baz'
@@ -109,8 +109,10 @@ config.methods = {
109109
}
110110
config.methods['foo'] = () => true
111111
config.provide = {
112-
foo: {}
112+
foo: {},
113+
[Symbol('injection key')]: {}
113114
}
115+
114116
config.provide['foo'] = {
115117
bar: {}
116118
}

0 commit comments

Comments
 (0)