You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using process.cwd() in one of my project files and its corresponding test, and I am getting weird results. In some places the path seems to be correct and in some other cases it shows /Users/rochdevost/github/rochdev/.atom/packages/atom-wallaby/projects/56433095f20fa692/instrumented/tinto.conf.js.
Thanks for providing the way to easily reproduce the issue!
When wallaby runs your node tests, process.cwd() should always be set to be the instrumented root of your project, so the /Users/rochdevost/github/rochdev/.atom/packages/atom-wallaby/projects/56433095f20fa692/instrumented value is correct in this context.
The issue was with the way wallaby replaces modules paths to look into local node modules instead of trying to search them in the instrumented root (it does it to avoid copying node modules to the instrumented folder). I have fixed it in core v1.0.103. Please let me know if your tests are passing now.
I am using
process.cwd()
in one of my project files and its corresponding test, and I am getting weird results. In some places the path seems to be correct and in some other cases it shows/Users/rochdevost/github/rochdev/.atom/packages/atom-wallaby/projects/56433095f20fa692/instrumented/tinto.conf.js
.The affected files:
https://github.com/rochdev/tinto/blob/master/lib/utils/config.js
https://github.com/rochdev/tinto/blob/master/test/utils/config.spec.js (at "should load by name")
How can I make
process.cwd()
always point to the correct location?The text was updated successfully, but these errors were encountered: