(assertionDiff: any[])
| 64 | } |
| 65 | |
| 66 | export function formatDiffText(assertionDiff: any[]): string|null { |
| 67 | const diffLines = |
| 68 | Array.from(formatDiff(assertionDiff, same => ` ${same}`, actual => `+${actual}`, expected => `-${expected}`)); |
| 69 | |
| 70 | if (diffLines.length > 0) { |
| 71 | return [ |
| 72 | '- expected', |
| 73 | '+ actual', |
| 74 | '', |
| 75 | ...diffLines, |
| 76 | ].join('\n'); |
| 77 | } |
| 78 | return null; |
| 79 | } |
| 80 | // The max length of the summary is 4000, but we need to leave some room for |
| 81 | // the rest of the HTML formatting (e.g. <pre> and </pre>). |
| 82 | const SUMMARY_LENGTH_CUTOFF = 3950; |
no test coverage detected