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

x/unitest/matcher/to_be_symbol.ts>toBeSymbol

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

Use .toBeSymbol when checking if a value is a symbol

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

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

test("passes when value is a symbol", () => {
  expect(Symbol()).toBeSymbol();
  expect(true).not.toBeSymbol();
});

Parameters

actual: unknown