-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Describe the bug
I have a project (esm) that uses undici (cjs). Everything works as expected during runtime but for some reason, the tests are failing. By looking at the error, it seems that vitest thinks module.exports.Something is undefined when undici does module.exports.Something = Something. What's weird is that this only happens on Windows, on Linux the same tests get passed without any issue.
I have created a repro for the issue that I'm facing. Try to run the tests on both Linux and Windows. It would fail on Windows.
Reproduction
https://github.com/iShibi/issue-repro
System Info
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 AMD Ryzen 5 4600H with Radeon Graphics
Memory: 1.67 GB / 7.36 GB
Binaries:
Node: 16.13.1 - ~\AppData\Local\Volta\tools\image\node\16.13.1\node.EXE
Yarn: 1.22.11 - ~\AppData\Local\Volta\tools\image\yarn\1.22.11\bin\yarn.CMD
npm: 8.1.2 - ~\AppData\Local\Volta\tools\image\node\16.13.1\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.62)
Internet Explorer: 11.0.19041.1202
npmPackages:
vitest: ^0.0.124 => 0.0.124Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable