]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test: rectify accidentally passing test
authorEvan You <evan@vuejs.org>
Thu, 8 Aug 2024 07:57:07 +0000 (15:57 +0800)
committerEvan You <evan@vuejs.org>
Thu, 8 Aug 2024 07:57:07 +0000 (15:57 +0800)
packages/runtime-dom/__tests__/patchProps.spec.ts

index 3e7de54a767364f04d8bb9d82dbd890b09f45bf4..952508f8f912c6487d02bbf0ab5698ca48fa2408 100644 (file)
@@ -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)
   })