From 9c77118b68f1e6cc05bbe09f421b34d61beb03c8 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sun, 11 Jun 2017 18:55:39 +0800 Subject: [PATCH] fix: clean more mocha error stack (#60) --- lib/mocha-clean.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/mocha-clean.js b/lib/mocha-clean.js index 08ea8e16..c9f1b34d 100644 --- a/lib/mocha-clean.js +++ b/lib/mocha-clean.js @@ -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 ()', 'at next (native)', @@ -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