Skip to main content
Module

x/unitest/mod.ts>toBeSealed

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

Use .toBeSealed when checking if an value is sealed

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

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

test("passes when value is sealed", () => {
  expect(Object.seal({})).toBeSealed();
  expect(1).toBeSealed();
  expect({}).not.toBeSealed();
});

Parameters

actual: unknown