From 0d315fd8917fe66abf8c202d5b008d7672967375 Mon Sep 17 00:00:00 2001 From: Noah Potter Date: Wed, 7 Feb 2018 12:14:09 -0700 Subject: [PATCH] Use the adapter on the MockAdapter instance (#110) This allows extending of the default MockAdapter adapter --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index c9c7af7..52ccfbe 100644 --- a/src/index.js +++ b/src/index.js @@ -34,7 +34,7 @@ function MockAdapter(axiosInstance, options) { this.axiosInstance = axiosInstance; this.originalAdapter = axiosInstance.defaults.adapter; this.delayResponse = options && options.delayResponse > 0 ? options.delayResponse : null; - axiosInstance.defaults.adapter = adapter.call(this); + axiosInstance.defaults.adapter = this.adapter.call(this); } }