Skip to main content
Module

x/unitest/mod.ts>toBeTrue

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

Use .toBeTrue when checking a value is true

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

const expect = defineExpect({
  matcherMap: {
    toBeTrue,
  },
  modifierMap: {
    not,
  },
});

test("passes when value is true", () => {
  expect(true).toBeTrue();
  expect(false).not.toBeTrue();
});

Parameters

actual: unknown