From: Evan You Date: Thu, 8 Aug 2024 07:57:07 +0000 (+0800) Subject: test: rectify accidentally passing test X-Git-Tag: v3.5.0-beta.1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b531d5716eb9b59fa1184a78b62212f4cad78f4;p=thirdparty%2Fvuejs%2Fcore.git test: rectify accidentally passing test --- diff --git a/packages/runtime-dom/__tests__/patchProps.spec.ts b/packages/runtime-dom/__tests__/patchProps.spec.ts index 3e7de54a76..952508f8f9 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) })