We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01db8fe commit 7a13fd6Copy full SHA for 7a13fd6
test/unit/features/options/inject.spec.js
@@ -220,6 +220,35 @@ describe('Options provide/inject', () => {
220
})
221
222
223
+ it('should extend properly', () => {
224
+ const parent = Vue.extend({
225
+ template: `<span/>`,
226
+ inject: ['foo']
227
+ })
228
+
229
+ const child = parent.extend({
230
231
+ inject: ['bar'],
232
+ created () {
233
+ injected = [this.foo, this.bar]
234
+ }
235
236
237
+ new Vue({
238
+ template: `<div><parent/><child/></div>`,
239
+ provide: {
240
+ foo: 1,
241
+ bar: false
242
+ },
243
+ components: {
244
+ parent,
245
+ child
246
247
+ }).$mount()
248
249
+ expect(injected).toEqual([1, false])
250
251
252
it('should warn when injections has been modified', () => {
253
const key = 'foo'
254
const vm = new Vue({
0 commit comments