Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not return the nock global from cleanAll() #1872

Merged
merged 3 commits into from Feb 11, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 1 addition & 8 deletions index.js
Expand Up @@ -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,
Expand Down