UNPKG

@thisisagile/easy-test

Version:

Straightforward library for testing microservices built with @thisisagile/easy

20 lines (19 loc) 570 B
import { match } from "../chunk-LN24S2PC.mjs"; import "../chunk-6EKWTLNQ.mjs"; import { asString } from "../chunk-O475TEG2.mjs"; // src/matchers/toMatchRoute.ts var toMatchRoute = (uri, route) => match(uri).undefined((u) => u, "Subject is undefined.").undefined(() => route, "Route to include is undefined.").not( (u) => asString(u).includes(asString(route)), (u) => `Uri '${u}' does not include '${route}'.` ).else((u) => `Uri '${u}' includes '${route}'`); expect.extend({ toMatchRoute }); export { toMatchRoute }; //# sourceMappingURL=toMatchRoute.mjs.map