Skip to content

Commit

Permalink
normalize path separators in stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
nhamer committed Oct 14, 2017
1 parent b66f8f8 commit f90e487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/common.js
Expand Up @@ -39,7 +39,8 @@ module.exports.stripFullStack = function (output) {
var stripChangingData = function (line) {
var withoutTestDir = line.replace(__dirname, '$TEST');
var withoutPackageDir = withoutTestDir.replace(path.dirname(__dirname), '$TAPE');
var withoutLineNumbers = withoutPackageDir.replace(/:\d+:\d+/g, ':$LINE:$COL');
var withoutPathSep = withoutPackageDir.replace(new RegExp('\\' + path.sep, 'g'), '/');
var withoutLineNumbers = withoutPathSep.replace(/:\d+:\d+/g, ':$LINE:$COL');
var withoutNestedLineNumbers = withoutLineNumbers.replace(/, \<anonymous\>:\$LINE:\$COL\)$/, ')');
return withoutNestedLineNumbers;
}
Expand Down

0 comments on commit f90e487

Please sign in to comment.