Removal of __esModule #1882
Replies: 1 comment
-
Actually, if I change my test to import router from "vue-router";
...
// In the test case
const mockRouter = {
push: cy.spy().as("pushSpy"),
};
cy.stub(router, "useRouter").returns(mockRouter); It also works, so that seems fine. I'll just close this issue again. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to update from v4.1.6 to v4.2.2. I ran into an issue with my Cypress component tests where I am stubbing the router. I used to be able to do this:
I use Typescript:
This would create a mock router and I could assert if the
pushSpy
had been called. After upgrading to v4.2.2 it doesn't work anymore. I noticed that in the output ofrouter
, the below line was removed:If I add that line back in the
vue-router.cjs
file everything works again. Also if I change my test to this:everything also seems to work again.
My question is: Why was this line removed? Is my issue intended or is it something that should be fixed in
router
?Beta Was this translation helpful? Give feedback.
All reactions