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

Function assertGreater

assert/greater.ts:24–30  ·  view source on GitHub ↗
(actual: T, expected: T, msg?: string)

Source from the content-addressed store, hash-verified

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

Calls 1

formatFunction · 0.90

Tested by

no test coverage detected