UNPKG

@thisisagile/easy-test

Version:

Straightforward library for testing microservices built with @thisisagile/easy

15 lines 659 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toMatchText = void 0; const Match_1 = require("./Match"); const Utils_1 = require("../utils/Utils"); const toMatchText = (value, text) => (0, Match_1.match)(value) .undefined(v => v, 'Subject is undefined.') .undefined(() => text, 'Text to match with is undefined.') .not(v => (0, Utils_1.asString)(v) === (0, Utils_1.asString)(text), v => `Text '${v}' does not match with text '${text}'.`) .else(v => `Text '${v}' matches`); exports.toMatchText = toMatchText; expect.extend({ toMatchText: exports.toMatchText, }); //# sourceMappingURL=toMatchText.js.map