2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-11-21 14:52:38 +00:00
|
|
|
|
|
|
|
import { expect } from "./expect.ts";
|
2024-04-29 02:57:30 +00:00
|
|
|
import { AssertionError, assertThrows } from "@std/assert";
|
2023-11-21 14:52:38 +00:00
|
|
|
|
|
|
|
Deno.test("expect().toBeLessThan()", () => {
|
|
|
|
expect(9).toBeLessThan(10);
|
|
|
|
|
|
|
|
expect(10).not.toBeLessThan(10);
|
|
|
|
expect(11).not.toBeLessThan(10);
|
|
|
|
|
|
|
|
assertThrows(() => {
|
|
|
|
expect(10).toBeLessThan(10);
|
|
|
|
}, AssertionError);
|
|
|
|
assertThrows(() => {
|
|
|
|
expect(11).toBeLessThan(10);
|
|
|
|
}, AssertionError);
|
|
|
|
|
|
|
|
assertThrows(() => {
|
|
|
|
expect(9).not.toBeLessThan(10);
|
|
|
|
}, AssertionError);
|
|
|
|
});
|