Closed vajahath closed 2 years ago
Confirmed - also does not require Windows for testing, since upath
does not actually do any conditionals based on the platform, I tested on Linux.
However, the fact that it doesn't do any such things is also why I don't spontaneously have an idea how the Jest environment could be causing this :/
One interesting observation is that upath.normalizeSafe
, unlike upath.normalize
, does the toUnix
correctly both in and outside of Jest.
Just ran into this issue. It essentially comes down to e.g. require('path').resolve instanceof Function
returning false
in Jest context, preventing upath from reimplementing the path functions (see upath.coffee#L21). I guess that makes this issue a duplicate of #2549.
Ahh. yay it's that one again 🙈
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
In Windows, upath module behaves differently with
node
andjest
. When using node, path separator is/
and for jest it is\
.To Reproduce
test.spec.js
With jest:
results in:
with node (with commented
test.todo('todo');
line)Closer look:
Expected behavior
A module should display same behavior with
node
andjest
in the same platform.envinfo