Function
assertInclude
(actual: string | undefined, expected: string, ..._: Array<never>)
Source from the content-addressed store, hash-verified
| 66 | } |
| 67 | |
| 68 | export function assertInclude(actual: string | undefined, expected: string, ..._: Array<never>) { |
| 69 | if (Predicate.isString(expected)) { |
| 70 | if (!actual?.includes(expected)) { |
| 71 | fail(`Expected\n\n${actual}\n\nto include\n\n${expected}`) |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | export function assertMatch(actual: string, regexp: RegExp, ..._: Array<never>) { |
| 77 | if (!regexp.test(actual)) { |
Callers
nothing calls this directly
Tested by
no test coverage detected