Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] stack trace path parsing on windows
Source files which are located in the current working directory, have a part of their path replaced by `path.sep + '$CWD'`. However, this causes the regular expression for stack trace lines to not match on windows. Example of a stack trace line, after replacement (`console.log(lineWithTokens)` in lib/test.js): ``` at Test.assert [as _assert] (\$CWD\example\my-test.js:483:11) ``` The part of the regexp that fails is `(?:\/|[a-zA-Z]:\\)`. I fixed this by allowing the path to start with a backslash. So instead of `\/`, the regexp uses `[/\\]`. This issue is already covered by existing test cases that are currently failing when they are ran on windows. For example: `.\node_modules\.bin\tap test/*.js`
- Loading branch information