-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
wxt/testing
doesn't mock webextension-polyfill
correctly
#293
Comments
Still not sure why the current solution is working in the But I have a solution. For some background: To mock wxt/src/core/builders/vite/plugins/webextensionPolyfillInlineDeps.ts Lines 12 to 21 in 7fd5752
It doesn't work because So the quick fix is to use Another solution is to use Both these solutions work with both the So I'm going to go with |
Released in |
Describe the bug
The polyfill gets loaded into the tests, throwing an error:
To get the tests to pass, just add
to the
vitest.config.ts
file.To Reproduce
Example Project.zip
pnpm i
pnpm test
Expected behavior
Tests should pass.
Additional Context
Discovered while working on #269. Not sure why it works in the monorepo, but this fails in a different repo.
The text was updated successfully, but these errors were encountered: