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

Function assertNotNull

apps/automated/src/tk-unit.ts:285–289  ·  view source on GitHub ↗
(actual: any, message?: string)

Source from the content-addressed store, hash-verified

283}
284
285export function assertNotNull(actual: any, message?: string) {
286 if (actual === null || actual === undefined) {
287 throw new Error(message + ' Actual: ' + actual + ' is null/undefined');
288 }
289}
290
291export function areClose(actual: number, expected: number, delta: number): boolean {
292 if (isNaN(actual) || Math.abs(actual - expected) > delta) {

Calls

no outgoing calls

Tested by

no test coverage detected