(stack: string)
| 40 | : string; |
| 41 | |
| 42 | export const removeLinesBeforeExternalMatcherTrap = (stack: string): string => { |
| 43 | const lines = stack.split('\n'); |
| 44 | |
| 45 | for (let i = 0; i < lines.length; i += 1) { |
| 46 | // It's a function name specified in `packages/expect/src/index.ts` |
| 47 | // for external custom matchers. |
| 48 | if (lines[i].includes('__EXTERNAL_MATCHER_TRAP__')) { |
| 49 | return lines.slice(i + 1).join('\n'); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | return stack; |
| 54 | }; |
| 55 | |
| 56 | const escapeRegex = true; |
| 57 | const printFunctionName = false; |
no outgoing calls
no test coverage detected