You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is really convenient since, for example, it enables us to mount a component with a mocked router and set different mocked methods for each scenario later on.
We have been using this method with vue-test-utils but it started failing since beta4.
The text was updated successfully, but these errors were encountered:
We started defining properties as reactive in beta 6. The Proxy created by testdouble throws an error when we call it in defineReactive. This might well be a bug with Vue, I'll investigate it further.
Alternatively, we could try/catch the call to defineReactive, but that wouldn't be ideal.
Version
1.0.0-beta.6
Reproduction link
https://codepen.io/albhilazo/pen/EbBPNv
Steps to reproduce
Use testdouble.js mock objects with vue-test-utils version >= beta4.
Open the reproduction CodePen to see a minimal test and the
Cannot convert a Symbol value to a string
error.What is expected?
That testdouble mock objects as ES6 proxies work when passed to
mount
orshallow
.They worked until beta3.
Reproduction with beta3: https://codepen.io/albhilazo/pen/aVgvvz
What is actually happening?
Tests break when using testdouble mock objects since beta4.
Reproduction with beta6: https://codepen.io/albhilazo/pen/EbBPNv
I use testdouble.js for mocking.
testdouble provides the creation of mock objects as ES6 proxies by calling
td.object()
.This is really convenient since, for example, it enables us to mount a component with a mocked router and set different mocked methods for each scenario later on.
We have been using this method with vue-test-utils but it started failing since beta4.
The text was updated successfully, but these errors were encountered: