import { toBeFrozen } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/to_be_frozen.ts";
Use .toBeFrozen
when checking if an object is frozen
import {
defineExpect,
not,
test,
toBeFrozen,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toBeFrozen,
},
modifierMap: {
not,
},
});
test("passes when value is frozen", () => {
expect(Object.freeze({})).toBeFrozen();
expect(1).toBeFrozen();
expect({}).not.toBeFrozen();
});