Function
assertInclude
(actual: string | undefined, expected: string, ..._: Array<never>)
Source from the content-addressed store, hash-verified
| 135 | * @since 4.0.0 |
| 136 | */ |
| 137 | export function assertInclude(actual: string | undefined, expected: string, ..._: Array<never>) { |
| 138 | if (typeof expected === "string") { |
| 139 | if (!actual?.includes(expected)) { |
| 140 | fail(`Expected\n\n${actual}\n\nto include\n\n${expected}`) |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Asserts that `actual` matches `regExp`. |
Callers
nothing calls this directly
Tested by
no test coverage detected