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 54c256b commit a7f9e25
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/client/src/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
const nock = require('nock');
const sgClient = require('./client');

const testRequest = (request, statusCode) => {
const sgClient = require('./client');
sgClient.setApiKey('SG.API Key');
sgClient.setDefaultHeader('X-Mock', statusCode);
return sgClient
.request(request)
.then(([response, body]) => {
expect(response.statusCode).to.equal(statusCode);
});
};

describe('client', () => {
const sgClient = require('./client');
Expand Down

0 comments on commit a7f9e25

Please sign in to comment.