Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/unitest/matcher/to_be_greater_than.ts>toBeGreaterThan

๐Ÿƒ Deno-first universal unit testing framework
Latest
function toBeGreaterThan
import { toBeGreaterThan } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/to_be_greater_than.ts";

Use .toBeGreaterThan to compare actual > expected for number or bigint

import { expect, test } from "https://deno.land/x/unitest@$VERSION/mod.ts";

test("passes when value greater than", () => {
  expect(100).toBeGreaterThan(99);
  expect(100n).toBeGreaterThan(99n);
  expect(1).not.toBeGreaterThan(1);
});

Parameters

actual: number | bigint
expected: number | bigint