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

Function cleanStderr

e2e/__tests__/failures.test.ts:16–21  ·  view source on GitHub ↗
(stderr: string)

Source from the content-addressed store, hash-verified

14const normalizeDots = (text: string) => text.replaceAll(/\.+$/gm, '.');
15
16function cleanStderr(stderr: string) {
17 const {rest} = extractSummary(stderr);
18 return rest
19 .replaceAll(/.*(jest-jasmine2|jest-circus).*\n/g, '')
20 .replaceAll(new RegExp('Failed: Object {', 'g'), 'thrown: Object {');
21}
22
23beforeAll(() => {
24 runYarnInstall(dir);

Callers 1

failures.test.tsFile · 0.70

Calls 1

extractSummaryFunction · 0.90

Tested by

no test coverage detected