From 0a4a944566116618bf8897d7dc6dcf943ba89fe6 Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Mon, 10 Feb 2020 22:36:33 -0500 Subject: [PATCH] Do not return the `nock` global from `cleanAll()` (#1872) BREAKING CHANGE: Do not return the `nock` global from `cleanAll()` (#1872) --- index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/index.js b/index.js index 654b8db5b..1c8d00d5a 100644 --- a/index.js +++ b/index.js @@ -29,14 +29,7 @@ Object.assign(module.exports, { removeInterceptor, disableNetConnect, enableNetConnect, - // TODO-12.x Historically `nock.cleanAll()` has returned the nock global. - // The other global methods do not do this, so it's not clear this was - // deliberate or is even helpful. This shim is included for backward - // compatibility and should be replaced with an alias to `removeAll()`. - cleanAll() { - removeAll() - return module.exports - }, + cleanAll: removeAll, abortPendingRequests, load, loadDefs,