Function
assertInclude
(actual: string | undefined, expected: string, ..._: Array<never>)
Source from the content-addressed store, hash-verified
| 118 | * @since 0.21.0 |
| 119 | */ |
| 120 | export function assertInclude(actual: string | undefined, expected: string, ..._: Array<never>) { |
| 121 | if (Predicate.isString(expected)) { |
| 122 | if (!actual?.includes(expected)) { |
| 123 | fail(`Expected\n\n${actual}\n\nto include\n\n${expected}`); |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Asserts that `actual` matches `regexp`. |
Callers
nothing calls this directly
Tested by
no test coverage detected