UNPKG

4.5

Version:

Monadic test assertions

14 lines 376 B
"use strict"; /** * Convert lazy assertions into eager assertions. * If an Assertion fails throws an Error. */ function assert(assertion) { var verification = { success: Function.prototype, failure: function (message) { throw new Error(message); }, }; assertion.verify(verification); } exports.assert = assert; //# sourceMappingURL=assert.js.map