Function
assertMatches
(actual: string, expected: RegExp, message?: string)
Source from the content-addressed store, hash-verified
| 303 | } |
| 304 | |
| 305 | export function assertMatches(actual: string, expected: RegExp, message?: string) { |
| 306 | if (expected.test(actual) !== true) { |
| 307 | throw new Error(`"${actual}" doesn't match "${expected}". ${message}`); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | export function arrayAssert(actual: Array<any>, expected: Array<any>, message?: string) { |
| 312 | if (actual.length !== expected.length) { |
Callers
nothing calls this directly
Tested by
no test coverage detected