MCPcopy Create free account
hub / github.com/denoland/std / assertLess

Function assertLess

assert/less.ts:23–29  ·  view source on GitHub ↗
(actual: T, expected: T, msg?: string)

Source from the content-addressed store, hash-verified

21 * @param msg The optional message to display if the assertion fails.
22 */
23export function assertLess<T>(actual: T, expected: T, msg?: string) {
24 if (actual < expected) return;
25
26 const actualString = format(actual);
27 const expectedString = format(expected);
28 throw new AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
29}

Callers 8

fnFunction · 0.90
pool_test.tsFile · 0.90
less_test.tsFile · 0.90

Calls 1

formatFunction · 0.90

Tested by

no test coverage detected