Skip to content

Commit edbe8e2

Browse files
committed
chore: cleanup
1 parent 2566f05 commit edbe8e2

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

test/cassettes/EasyPost_3093958733/makes-an-API-call-using-the-generic-makeApiCall-method_2342601902/recording.har

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/services/easypost.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,10 @@ describe('EasyPost', function () {
149149
});
150150

151151
it('makes an API call using the generic makeApiCall method', async function () {
152-
const response = await client.makeApiCall(EasyPostClient.METHODS.GET, '/addresses', {
152+
const response = await client.makeApiCall('get', '/addresses', {
153153
page_size: 1,
154154
});
155155

156-
expect(response.addresses).to.be.an('array');
157156
expect(response.addresses.length).to.equal(1);
158157
expect(response.addresses[0].object).to.equal('Address');
159158
});

types/EasyPost.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,26 +116,32 @@ export default class EasyPost {
116116
* Adds a request hook to the EasyPost client. Useful for logging or debugging.
117117
*/
118118
public addRequestHook(fn: (config: IEasyPostRequest) => void): void;
119+
119120
/**
120121
* Removes a request hook from the EasyPost client.
121122
*/
122123
public removeRequestHook(fn: (config: IEasyPostRequest) => void): void;
124+
123125
/**
124126
* Clears all request hooks from the EasyPost client.
125127
*/
126128
public clearRequestHooks(): void;
129+
127130
/**
128131
* Adds a response hook to the EasyPost client. Useful for logging or debugging.
129132
*/
130133
public addResponseHook(fn: (config: IEasyPostResponse) => void): void;
134+
131135
/**
132136
* Removes a response hook from the EasyPost client.
133137
*/
134138
public removeResponseHook(fn: (config: IEasyPostResponse) => void): void;
139+
135140
/**
136141
* Clears all response hooks from the EasyPost client.
137142
*/
138143
public clearResponseHooks(): void;
144+
139145
/**
140146
* Make an API call to the EasyPost API.
141147
*

0 commit comments

Comments
 (0)