Description
Per #1137, if a test pattern matches a symlink, AVA fails to run that test file.
AVA precompiles the test file in the main process. That works fine, even with symlinks. It then communicates a hash for the precompilation result to the worker process. When the test file is required the worker loads it from the precompilation cache, using the hash received from the main process.
The problem is that the hash mapping is for the symlink path, but the worker sees the resolved path instead.
This is where the worker looks up the hash:
Line 85 in 0f04001
This is where the precompiled
hash mapping is prepared:
Line 70 in 0f04001
Probably the best fix is to use fs.realpathSync
when preparing the hash mapping in api.js
.