|
|
@@ -312,6 +312,13 @@ describe('api: watch', () => {
|
|
|
expect(called).toBe(true)
|
|
|
})
|
|
|
|
|
|
+ it('watching empty multiple sources with immediate: true', () => {
|
|
|
+ const spy = vi.fn()
|
|
|
+ watch([], spy, { immediate: true })
|
|
|
+ expect(spy).toHaveBeenCalledTimes(1)
|
|
|
+ expect(spy).toHaveBeenCalledWith([], [], expect.any(Function))
|
|
|
+ })
|
|
|
+
|
|
|
it('watching multiple sources: readonly array', async () => {
|
|
|
const state = reactive({ count: 1 })
|
|
|
const status = ref(false)
|