@thisisagile/easy-test
Version:
Straightforward library for testing microservices built with @thisisagile/easy
15 lines • 672 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toMatchRoute = void 0;
const Match_1 = require("./Match");
const Utils_1 = require("../utils/Utils");
const toMatchRoute = (uri, route) => (0, Match_1.match)(uri)
.undefined(u => u, 'Subject is undefined.')
.undefined(() => route, 'Route to include is undefined.')
.not(u => (0, Utils_1.asString)(u).includes((0, Utils_1.asString)(route)), u => `Uri '${u}' does not include '${route}'.`)
.else(u => `Uri '${u}' includes '${route}'`);
exports.toMatchRoute = toMatchRoute;
expect.extend({
toMatchRoute: exports.toMatchRoute,
});
//# sourceMappingURL=toMatchRoute.js.map