Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'set' on proxy: trap returned falsish for property 'hasOwnProperty' #3

Open
KengoWada opened this issue Jul 11, 2021 · 2 comments

Comments

@KengoWada
Copy link

I keep trying to mount the component for real world testing L2 start but I keep getting this error

> [email protected] test:unit
> vue-cli-service test:unit

 FAIL  tests/unit/EventCard.spec.js
  EventCard
    ✕ renders the event's data successfully (16ms)

  ● EventCard › renders the event's data successfully

    TypeError: 'set' on proxy: trap returned falsish for property 'hasOwnProperty'

      11 |     }
      12 | 
    > 13 |     mount(EventCard, { props: { event } })
         |     ^
      14 |   })
      15 | })
      16 | 

      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:7838:24)
      at Object.<anonymous> (tests/unit/EventCard.spec.js:13:5)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        1.157s, estimated 2s
Ran all test suites.
@onydra
Copy link

onydra commented Jul 7, 2022

Hi @KengoWada, I had the same issue and resolved it by bumping vue to 2.0.6. This seemed to be a common issue with prior versions and vue-test-utils.

@Makoehle
Copy link

I've came across the same issue but I had to update to 3.0.6 according to

Steps to fix:

  1. Replace "vue": "^3.0.0-0", with "vue": "^3.0.6",
  2. Run npm install

My dependencies in package.json now look like this.

  "dependencies": {
    "core-js": "^3.6.5",
    "uuid": "^8.3.2",
    "vue": "^3.0.6",
    "vue-router": "^4.0.0-0",
    "vuex": "^4.0.0-0"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants