Skip to content

Commit 48f0862

Browse files
committed
Remove the node internal frames from stack traces
1 parent e6a320c commit 48f0862

File tree

1 file changed

+4
-0
lines changed
  • v-next/hardhat-node-test-reporter/integration-tests

1 file changed

+4
-0
lines changed

v-next/hardhat-node-test-reporter/integration-tests/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,9 @@ function normalizeOutputs(output: string): string {
7171
.replaceAll(/\(.*?:\d+:\d+\)/g, (match) => {
7272
return match.replaceAll(path.sep, "/");
7373
})
74+
// Remove lines like `at TestHook.run (node:internal/test_runner/test:1107:18)`
75+
.replaceAll(/at .*? \(node\:.*?:\d+:\d+\)/g, "")
76+
// Remove lines like `at node:internal/test_runner/test:776:20`
77+
.replaceAll(/at node\:.*?:\d+:\d+/g, "")
7478
);
7579
}

0 commit comments

Comments
 (0)