MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / assertMatches

Function assertMatches

apps/automated/src/tk-unit.ts:305–309  ·  view source on GitHub ↗
(actual: string, expected: RegExp, message?: string)

Source from the content-addressed store, hash-verified

303}
304
305export 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
311export function arrayAssert(actual: Array<any>, expected: Array<any>, message?: string) {
312 if (actual.length !== expected.length) {

Callers

nothing calls this directly

Calls 1

testMethod · 0.45

Tested by

no test coverage detected