From 93e984f60cfb01f76f06193a5257a941d36928fe Mon Sep 17 00:00:00 2001 From: Andrew Appleton Date: Wed, 9 Nov 2016 15:28:33 +0000 Subject: [PATCH] Global setup/teardown of nock --- test/test-setup.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/test-setup.js diff --git a/test/test-setup.js b/test/test-setup.js new file mode 100644 index 0000000..e0b1104 --- /dev/null +++ b/test/test-setup.js @@ -0,0 +1,11 @@ +/* eslint-env mocha */ +const nock = require('nock') + +beforeEach(function () { + nock.disableNetConnect() +}) + +afterEach(function () { + nock.cleanAll() + nock.enableNetConnect() +})