Skip to content

Commit

Permalink
Update client.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutiburman committed Nov 19, 2023
1 parent a7f9e25 commit 82b93ad
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions packages/client/src/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
});
});
});

0 comments on commit 82b93ad

Please sign in to comment.