-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
To debug, I added the following statements to a number of internal AVA files:
console.log(__filename);
On Node 5, when everything works, I get this output:
/~/dev/ava/lib/fork.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/index.js
/~/dev/ava/index.js
/~/dev/ava/index.js
/~/dev/ava/index.js
/~/dev/ava/index.js
On Node 6, where things are broken:
/~/dev/ava-codemods/node_modules/ava/lib/fork.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava/lib/test-worker.js
/~/dev/ava-codemods/node_modules/ava/index.js
/~/dev/ava-codemods/node_modules/ava/index.js
/~/dev/ava-codemods/node_modules/ava/index.js
/~/dev/ava-codemods/node_modules/ava/index.js
/~/dev/ava-codemods/node_modules/ava/lib/test-worker.js
/~/dev/ava-codemods/node_modules/ava/lib/test-worker.js
/~/dev/ava-codemods/node_modules/ava/lib/test-worker.js
/~/dev/ava-codemods/node_modules/ava/index.js
/~/dev/ava-codemods/node_modules/ava/lib/test-worker.js
So, it appears that, in Node 6, npm linked modules think they are inside the node_modules
folder of the project from which they are linked, instead of their actual path on the file system.
However, when we fork test-worker.js
, it is aware of it's actual path. But that gets confused when when the user does require('ava')
and the file paths show as nested again.
You will notice test-worker
shows up twice as often as it should, with a deeper path the second time around.
Metadata
Metadata
Assignees
Labels
No labels