diff --git a/packages/client/src/client.spec.js b/packages/client/src/client.spec.js index 87556425..93598893 100644 --- a/packages/client/src/client.spec.js +++ b/packages/client/src/client.spec.js @@ -26,14 +26,6 @@ describe('client', () => { nock.cleanAll(); }); - describe('setDataResidency', () => { - sgClient.setDataResidency('eu'); - console.log('Actual:', sgClient.defaultRequest.baseUrl); - it('should have hostname as global', () => { - expect(sgClient.defaultRequest.baseUrl).to.equal('api.eu.sendgrid.com'); - }); - }); - describe('setApiKey', () => { it('should not log a warning for a proper API key value', () => { sgClient.setApiKey('SG.1234567890'); @@ -3100,3 +3092,23 @@ describe('test_whitelabel_links__link_id__subuser_post', () => { return testRequest(request, 200); }); }); + + +describe('test client', () => { + const testClient = require('./client'); + + afterEach(() => { + console.warn.restore(); + nock.cleanAll(); + }); + + describe('setDataResidency', () => { + testClient.setDataResidency('eu'); + console.log('Actual:', testClient.defaultRequest.baseUrl); + it('should have hostname as global', () => { + console.log(testClient); + expect(testClient.defaultRequest.baseUrl).to.equal('api.eu.sendgrid.com'); + }); + }); +}); +