( received: string, start: number, length: number, // not end )
| 19 | const printSubstring = (val: string): string => val.replaceAll(/"|\\/g, '\\$&'); |
| 20 | |
| 21 | export const printReceivedStringContainExpectedSubstring = ( |
| 22 | received: string, |
| 23 | start: number, |
| 24 | length: number, // not end |
| 25 | ): string => |
| 26 | RECEIVED_COLOR( |
| 27 | `"${printSubstring(received.slice(0, start))}${INVERTED_COLOR( |
| 28 | printSubstring(received.slice(start, start + length)), |
| 29 | )}${printSubstring(received.slice(start + length))}"`, |
| 30 | ); |
| 31 | |
| 32 | export const printReceivedStringContainExpectedResult = ( |
| 33 | received: string, |
no test coverage detected