MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / assertAreClose

Function assertAreClose

apps/automated/src/tk-unit.ts:299–303  ·  view source on GitHub ↗
(actual: number, expected: number, delta: number, message?: string)

Source from the content-addressed store, hash-verified

297}
298
299export function assertAreClose(actual: number, expected: number, delta: number, message?: string) {
300 if (!areClose(actual, expected, delta)) {
301 throw new Error(message + ' Numbers are not close enough. Actual: ' + actual + ' Expected: ' + expected + ' Delta: ' + delta);
302 }
303}
304
305export function assertMatches(actual: string, expected: RegExp, message?: string) {
306 if (expected.test(actual) !== true) {

Callers

nothing calls this directly

Calls 1

areCloseFunction · 0.70

Tested by

no test coverage detected