Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/unitest/matcher/mod.ts>toBeTruthy

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

Use .toBeTruthy when you don't care what a value is and you want to ensure a value is true in a boolean context

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

test("should be truthy", () => {
  expect(true).toBeTruthy();
  expect(1).toBeTruthy();
  expect(0).not.toBeTruthy();
});

Parameters

actual: unknown