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

x/unitest/matcher/to_be_less_than.ts>toBeLessThan

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

Use .toBeLessThan to compare actual < expected for number or bigint

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

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

Parameters

actual: number | bigint
expected: number | bigint

Returns

MatchResult