Skip to content

Commit 59b955d

Browse files
committed
Fix Watch.spec.ts
1 parent 36fad3c commit 59b955d

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

Diff for: tests/decorators/Watch.spec.ts

+22-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,18 @@ describe(Watch, () => {
3434
})
3535

3636
it('sets options correctly', () => {
37-
expect(wrapper.vm.$options.watch).toMatchInlineSnapshot(`Object {}`)
37+
expect(wrapper.vm.$options.watch?.[WATCH_PATH]).toMatchInlineSnapshot(`
38+
Array [
39+
Object {
40+
"handler": "onChange",
41+
"user": true,
42+
},
43+
Object {
44+
"handler": "onChangeAnother",
45+
"user": true,
46+
},
47+
]
48+
`)
3849
})
3950

4051
it('does not call on mounted', () => {
@@ -76,7 +87,16 @@ describe(Watch, () => {
7687
})
7788

7889
it('sets options correctly', () => {
79-
expect(wrapper.vm.$options.watch).toMatchInlineSnapshot(`Object {}`)
90+
expect(wrapper.vm.$options.watch?.[WATCH_PATH]).toMatchInlineSnapshot(`
91+
Array [
92+
Object {
93+
"deep": true,
94+
"handler": "onChange",
95+
"immediate": true,
96+
"user": true,
97+
},
98+
]
99+
`)
80100
})
81101
})
82102

0 commit comments

Comments
 (0)