@thisisagile/easy-test
Version:
Straightforward library for testing microservices built with @thisisagile/easy
15 lines • 559 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toBeValid = void 0;
const Utils_1 = require("../utils/Utils");
const Match_1 = require("./Match");
const toBeValid = (v) => (0, Match_1.match)(v)
.undefined(s => s, 'Subject is undefined.')
.not(s => (0, Utils_1.isA)(s, 'isValid'), 'Subject is not validatable.')
.not(s => s.isValid, `Subject is not valid.`)
.else(`Subject is valid`);
exports.toBeValid = toBeValid;
expect.extend({
toBeValid: exports.toBeValid,
});
//# sourceMappingURL=toBeValid.js.map