diff --git a/src/index.js b/src/index.js index dfc66f2..4b4f048 100644 --- a/src/index.js +++ b/src/index.js @@ -109,4 +109,5 @@ function addHandler(method, handlers, handler) { } } -module.exports = module.exports.default = MockAdapter; +module.exports = MockAdapter; +module.exports.default = MockAdapter; diff --git a/types/index.d.ts b/types/index.d.ts index 380a16f..346d02a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -42,4 +42,4 @@ declare class MockAdapter { onAny: RequestMatcherFunc; } -export = MockAdapter; +export default MockAdapter; diff --git a/types/test.ts b/types/test.ts index 983aa37..c8c6ff7 100644 --- a/types/test.ts +++ b/types/test.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import MockAdapter = require("axios-mock-adapter"); +import MockAdapter from "axios-mock-adapter"; const instance = axios.create(); const mock = new MockAdapter(instance);