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

x/unitest/matcher/to_be_nan.ts>toBeNaN

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

Use .toBeNaN when checking a value is NaN

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

test("passes when value less than", () => {
  expect(NaN).toBeNaN();
  expect(-NaN).toBeNaN();
  expect(1).not.toBeNaN();
});

Parameters

actual: unknown