From 9b531d5716eb9b59fa1184a78b62212f4cad78f4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 8 Aug 2024 15:57:07 +0800 Subject: [PATCH] test: rectify accidentally passing test --- packages/runtime-dom/__tests__/patchProps.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/runtime-dom/__tests__/patchProps.spec.ts b/packages/runtime-dom/__tests__/patchProps.spec.ts index 3e7de54a7..952508f8f 100644 --- a/packages/runtime-dom/__tests__/patchProps.spec.ts +++ b/packages/runtime-dom/__tests__/patchProps.spec.ts @@ -181,10 +181,11 @@ describe('runtime-dom: props patching', () => { // anyway, here we just want to make sure Vue doesn't set non-string props // to an empty string on nullish values - it should reset to its default // value. + el.srcObject = null const initialValue = el.srcObject const fakeObject = {} patchProp(el, 'srcObject', null, fakeObject) - expect(el.srcObject).not.toBe(fakeObject) + expect(el.srcObject).toBe(fakeObject) patchProp(el, 'srcObject', null, null) expect(el.srcObject).toBe(initialValue) })