We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cd6686 commit d055022Copy full SHA for d055022
src/mount.ts
@@ -441,8 +441,11 @@ export function mount(
441
// if not, use the return value from app.mount.
442
const appRef = vm.$refs[MOUNT_COMPONENT_REF] as ComponentPublicInstance
443
const $vm = Reflect.ownKeys(appRef).length ? appRef : vm
444
+ // we add `hasOwnProperty` so jest can spy on the proxied vm without throwing
445
+ $vm.hasOwnProperty = (property) => {
446
+ return Reflect.has($vm, property)
447
+ }
448
console.warn = warnSave
-
449
return createWrapper(app, $vm, setProps)
450
}
451
0 commit comments