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

x/unitest/matcher/to_be_sealed.ts>toBeSealed

๐Ÿƒ Deno-first universal unit testing framework
Latest
function toBeSealed
import { toBeSealed } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/to_be_sealed.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