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

x/unitest/matcher/mod.ts>toBeDefined

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

Use .toBeDefined to check that a variable is not undefined

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

test("there is a new flavor idea", () => {
  expect("defined").toBeDefined();
  expect(undefined).not.toBeDefined();
});

Parameters

actual: unknown