Skip to content

Commit c900b06

Browse files
committed
fix: remove hasOwnProperty workaround
vue-test-utils-next now uses jest v27.1+, which includes a fix for hasOwnPropery (see jestjs/jest#11721). This allows to remove the dirty workaround we had in our codebase, but users will have to update to Jest v27.1+.
1 parent 226d3f1 commit c900b06

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/mount.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,6 @@ export function mount(
464464
// if not, use the return value from app.mount.
465465
const appRef = vm.$refs[MOUNT_COMPONENT_REF] as ComponentPublicInstance
466466
const $vm = Reflect.ownKeys(appRef).length ? appRef : vm
467-
// we add `hasOwnProperty` so jest can spy on the proxied vm without throwing
468-
$vm.hasOwnProperty = (property) => {
469-
return Reflect.has($vm, property)
470-
}
471467
console.warn = warnSave
472468
return createWrapper(app, $vm, setProps)
473469
}

0 commit comments

Comments
 (0)