diff --git a/package.json b/package.json index 3a1fa1c851..2e62e7c7fe 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,13 @@ "vuex": "^4.0.2" }, "peerDependencies": { - "vue": "^3.0.1" + "vue": "^3.0.1", + "jest": "^27.1.0" + }, + "peerDependenciesMeta": { + "jest": { + "optional": true + } }, "author": { "name": "Lachlan Miller", diff --git a/src/mount.ts b/src/mount.ts index 401b9caf0a..69fc1875ea 100644 --- a/src/mount.ts +++ b/src/mount.ts @@ -507,10 +507,6 @@ export function mount( console.warn = () => {} const appRef = vm.$refs[MOUNT_COMPONENT_REF] as ComponentPublicInstance - // we add `hasOwnProperty` so jest can spy on the proxied vm without throwing - appRef.hasOwnProperty = (property) => { - return Reflect.has(appRef, property) - } console.warn = warnSave const wrapper = createVueWrapper(app, appRef, setProps) trackInstance(wrapper)