(...strings: Array<string>)
| 501 | type PrintLabel = (string: string) => string; |
| 502 | |
| 503 | export const getLabelPrinter = (...strings: Array<string>): PrintLabel => { |
| 504 | const maxLength = strings.reduce( |
| 505 | (max, string) => Math.max(string.length, max), |
| 506 | 0, |
| 507 | ); |
| 508 | return (string: string): string => |
| 509 | `${string}: ${' '.repeat(maxLength - string.length)}`; |
| 510 | }; |
| 511 | |
| 512 | export const matcherErrorMessage = ( |
| 513 | hint: string, // assertion returned from call to matcherHint |
no outgoing calls
no test coverage detected