test: rectify accidentally passing test

This commit is contained in:
Evan You 2024-08-08 15:57:07 +08:00
parent 7d5743223f
commit 9b531d5716
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 2 additions and 1 deletions

View 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)
})