Skip to content

Commit

Permalink
fix: clean more mocha error stack (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored and popomore committed Jun 11, 2017
1 parent 3aadadf commit 9c77118
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mocha-clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const internal = [
'(domain.js:',
'GeneratorFunctionPrototype.next (native)',
'at Generator.next',
/at process\._tickDomainCallback \(.*\)/,
/at emitCloseNT \(net\.js.*\)/,
/at _combinedTickCallback \(internal.*\)/,
// node 8.x
'at Promise (<anonymous>)',
'at next (native)',
Expand All @@ -16,6 +19,7 @@ const internal = [
/node_modules\/.*mocha\//,
/node_modules\/.*co\//,
/node_modules\/.*co-mocha\//,
/node_modules\/.*supertest\//,
];

// monkey-patch `Runner#fail` to modify stack
Expand Down

0 comments on commit 9c77118

Please sign in to comment.