@visi/jest
Version:
41 lines • 1.54 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
require("jest");
const core_1 = require("@visi/core");
/* eslint-enable */
expect.extend({
toBeFail(received) {
const pass = (received === null || received === void 0 ? void 0 : received.outcome) === core_1.Outcome.FAIL;
return {
pass,
message: () => {
if (received == null)
return `Report is not defined`;
return `Outcome for report ${received.id} was ${received.outcome} while expecting FAIl`;
},
};
},
toBePassed(received) {
const pass = (received === null || received === void 0 ? void 0 : received.outcome) === core_1.Outcome.PASSED;
return {
pass,
message: () => {
if (received == null)
return `Report is not defined`;
return `Outcome for report ${received.id} was ${received.outcome} while expecting PASSED`;
},
};
},
toBeInapplicable(received) {
const pass = (received === null || received === void 0 ? void 0 : received.outcome) === core_1.Outcome.INAPPLICABLE;
return {
pass,
message: () => {
if (received == null)
return `Report is not defined`;
return `Outcome for report ${received.id} was ${received.outcome} while expecting FAIl`;
},
};
},
});
//# sourceMappingURL=extend-expect.js.map
;