-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unable to mock 'vue-meta' #1714
Comments
Note: This started happening in vitest@0.14.2 |
By my test, it's ok in |
@sheremet-va, @ChpShy. Just tested it in both Thanks to everyone involved, that was a super quick fix! |
Also unable to mock vue-meta, google brings me here so I am leaving link for my followers. I have find out that now it seems to be unexpected breaking change in vite v3.0.6 more info in dedicated issue. Happy coding namaste 🙏 |
Describe the bug
I was trying to upgrade Vitest from version
0.12.9
to0.19.0
and now tests that are asserting a specific function from a module to have been called started failing.That module is an npm package called
vue-meta
. (Link)I have components that
import { useMeta } from 'vue-meta'
.That
useMeta
function is called when some components are mounted or created.All I want to do is to spy
useMeta
and assert it, expecting that it gets called. Should be easy, right?But for some reason this stopped working after the upgrade and I'm clueless in understanding why.
I was able to create StackBlitz reproducing this. Just open the link and the test will run automatically.
Reproduction
https://stackblitz.com/edit/vue-vitest-demo
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: