@decathlon/moon-testing
Advanced tools
Comparing version 0.0.2 to 0.1.2
@@ -45,6 +45,6 @@ "use strict"; | ||
if (ClientFactory === void 0) { ClientFactory = AxiosClient; } | ||
Axios.create = jest.fn().mockImplementation(function (_a) { | ||
Axios.create = function (_a) { | ||
var baseUrl = _a.baseUrl; | ||
return new ClientFactory(baseUrl); | ||
}); | ||
}; | ||
} | ||
@@ -54,3 +54,4 @@ exports.mockAxiosClientConstructor = mockAxiosClientConstructor; | ||
exports.cancelToken = { cancel: function () { return jest.fn(); } }; | ||
axios_1.default.CancelToken.source = jest.fn().mockReturnValue(exports.cancelToken); | ||
//@ts-ignore | ||
axios_1.default.CancelToken.source = function () { return exports.cancelToken; }; | ||
var moon_client_1 = require("./moon-client"); | ||
@@ -57,0 +58,0 @@ Object.defineProperty(exports, "MoonClient", { enumerable: true, get: function () { return moon_client_1.default; } }); |
{ | ||
"name": "@decathlon/moon-testing", | ||
"version": "0.0.2", | ||
"version": "0.1.2", | ||
"description": "Moon testing utilities.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
331
38150