MCPcopy
hub / github.com/jestjs/jest / removeStackTraces

Function removeStackTraces

e2e/__tests__/failureDetailsProperty.test.ts:11–15  ·  view source on GitHub ↗
(stdout: string)

Source from the content-addressed store, hash-verified

9import runJest from '../runJest';
10
11const removeStackTraces = (stdout: string) =>
12 stdout.replaceAll(
13 /at (new Promise \(<anonymous>\)|.+:\d+:\d+\)?)/g,
14 'at <stacktrace>',
15 );
16
17test('that the failureDetails property is set', () => {
18 const {stdout, stderr} = runJest('failureDetails-property', [

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected