lml-main
Version:
This is now a mono repository published into many standalone packages.
19 lines • 824 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var redux_rx_http_1 = require("redux-rx-http");
exports.mockSuccess = function (data, key) {
return redux_rx_http_1.rxHttpSuccess({
data: data,
response: new Response(JSON.stringify(data), { status: 200 }),
}, key, undefined, redux_rx_http_1.createRxHttpActionTypes('MOCK'));
};
exports.mockErr = function (actionTypes, body, status) {
if (actionTypes === void 0) { actionTypes = redux_rx_http_1.createRxHttpActionTypes('MOCK'); }
if (body === void 0) { body = {}; }
if (status === void 0) { status = 500; }
return redux_rx_http_1.rxHttpError({
body: body,
response: new Response(JSON.stringify(body), { status: status }),
}, undefined, actionTypes);
};
//# sourceMappingURL=utils.js.map