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
Provides with Symbol not available to rendered component #750
Comments
Got the same issue when using vuetify. Vuetify is using a Symbol internally. Running a test for component which is using a Vuetify Component, the test fails with the following error:
Here is a small reproduction repo: https://stackblitz.com/edit/nuxt-starter-7jgbwx?file=vitest.config.ts |
FYI @danielroe I just had a deeper look into this. I've added a couple of breakpoints and ran vitest. Here are a couple of findings:
I hope this is helpful on finding the cause of this issue. For now i have to go back to @vue/test-utils. |
This is probably a regression from #726 |
Thank you for this quick response. Also just found this comment within the examples plugin
https://github.com/nuxt/test-utils/blob/main/examples/app-vitest-full/plugins/inject-value.ts#L1 |
I came up with the ad-hoc solution. Sorry if you already know this. This solution intends that the imported symbol always become same value. |
Environment
Darwin
v20.11.0
3.10.0
3.10.0
2.8.1
[email protected]
-
modules
,imports
,typescript
@nuxt/test-utils/[email protected]
-
Reproduction
https://github.com/lucasecdb/nuxt-context-error-repro
Describe the bug
Provided value in plugin does not reach the component when using a
Symbol()
as key.You can check the behavior by running
pnpm test
in the MRE. If you run the app usingpnpm start
and go tohttp://localhost:3006
you can see the "hello world" string correctly.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: