Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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