import { extendExpect } from "https://deno.land/x/unitest@v1.0.0-beta.82/expect/mod.ts";
Return new expect
based on another expect
. All definitions are deep merged.
Duplicate fields will be replaced by the new definition.
import {
expect,
extendExpect,
test,
toBeString,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const newExpect = extendExpect(expect, {
matcherMap: {
toBeString,
},
});
test("should be string", () => {
newExpect("unitest").toBeString();
});
Type Parameters
Matcher extends MatcherMap
Modifier extends ModifierMap
NewMatcher extends MatcherMap
NewModifier extends ModifierMap
Parameters
unnamed 1: Partial<Definition<NewMatcher, NewModifier>>