Closed
Description
openedon Nov 3, 2017
I had the following test fail when running npm test
in a docker container where I had mounting the mocha source at /local
.
https://github.com/mochajs/mocha/blob/master/test/unit/runner.spec.js#L406
The issue is here.
Line 600 in 1bb6b39
The replace call, causes '/usr/local/dev' to be changed to '/usrdev/, and the string comparison fails in the assert.
I imagine you would have to do a fancier regex replacement to get this to work correctly. In practice this might not be a huge issue since users tend to be in /home/username/path
which should be reasonably unique.
However, I can imagine a situation where some files being stored at /tmp/<random_string>/home/username/path/filename
or a similar location would occur in a stack trace message and be replaced to /tmp/<random_string>/filename
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment