import { toStartWith } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/to_start_with.ts";
Use .toStartWith
when checking if a String starts with a given String prefix
import {
defineExpect,
not,
test,
toStartWith,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toStartWith,
},
modifierMap: {
not,
},
});
test("passes when value is starts with given string", () => {
expect("hello world").toStartWith("hello");
expect("hello world").not.toStartWith("world");
});