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

Function addExtraLineBreaks

packages/jest-snapshot/src/utils.ts:31–32  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

29// Add extra line breaks at beginning and end of multiline snapshot
30// to make the content easier to read.
31export const addExtraLineBreaks = (string: string): string =>
32 string.includes('\n') ? `\n${string}\n` : string;
33
34// Remove extra line breaks at beginning and end of multiline snapshot.
35// Instead of trim, which can remove additional newlines or spaces

Callers 2

matchMethod · 0.90
utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected