Skip to content

Commit 3c65239

Browse files
committed
test: improve inject default test case
1 parent 88423fc commit 3c65239

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: test/unit/features/options/inject.spec.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,14 @@ describe('Options provide/inject', () => {
380380
bar: { default: false },
381381
baz: { default: undefined }
382382
},
383-
created () {}
383+
created () {
384+
injected = [this.foo, this.bar, this.baz]
385+
}
384386
})
385387
expect(`Injection "foo" not found`).not.toHaveBeenWarned()
386388
expect(`Injection "bar" not found`).not.toHaveBeenWarned()
387389
expect(`Injection "baz" not found`).not.toHaveBeenWarned()
390+
expect(injected).toEqual([1, false, undefined])
388391
})
389392

390393
it('should use provided value even if inject has default', () => {

0 commit comments

Comments
 (0)