-
Notifications
You must be signed in to change notification settings - Fork 5
Mapped paths broken on Windows machines #46
Conversation
Windows machines with mapped drives fail to find unit tests. If a C:\projects\test.js drive is mapped to H:\test.js, running jest unit tests will search for H:\test.js inside of C:\projects which will obviously fail. We noticed this behavior when we upgraded our jest to 24.x and after a lot of troubleshooting we see that the process.binding('fs') seems to be the culprit.
|
||
if (fsBinding.realpath) { | ||
if (fsBinding.realpath && !isWin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt this is the fix - this module exists almost entirely because of windows and its horrible handling of symlinks
Does #39 fix the issue for you? |
I see, I've pasted his code into my local node module and it comes back with the same error I'm trying to fix which is showing that it can't find the unit tests because of the mapped drive. The drive mapping and operating system are outside of my control as it's the setup for all devs at my company. I did look through the process.binding documentation and node.js docs seem to say that "process.binding() is for use by Node.js internal code only" and also that it is deprecated as of node 11. I wonder is it necessary at all to use it? |
I am running into a similiar issue over here using a RAM-disk. It seems to break in line 29:
I could fix it by doing this in line 29 instead. What do you think?
|
I've published a v3 and deprecated it - all current releases of node supports Jest 26 no longer depends on this module. |
Windows machines with mapped drives fail to find unit tests. If a C:\projects\test.js drive is mapped to H:\test.js, running jest unit tests will search for H:\test.js inside of C:\projects which will obviously fail. We noticed this behavior when we upgraded our jest to 24.x and after a lot of troubleshooting we see that the process.binding('fs') seems to be the culprit.