Skip to content

Commit

Permalink
[Tests] handle stack differences in node 15
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 20, 2020
1 parent 7574152 commit 1ac9ecf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/common.js
Expand Up @@ -56,7 +56,11 @@ module.exports.stripFullStack = function (output) {
return line;
});

var deduped = withDuplicates.filter(function (line, ix) {
var withoutInternals = withDuplicates.filter(function (line) {
return !line.match(/ \(node:[^)]+\)$/);
});

var deduped = withoutInternals.filter(function (line, ix) {
var hasPrior = line === stripped && withDuplicates[ix - 1] === stripped;
return !hasPrior;
});
Expand Down

0 comments on commit 1ac9ecf

Please sign in to comment.