Skip to content

Commit 1f5479a

Browse files
committed
Update unit tests for ContentstackHTTPClient to assert error handling behavior, ensuring proper verification of error responses and status codes.
1 parent 2625b8b commit 1f5479a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/unit/ContentstackHTTPClient-test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,13 @@ describe('Contentstack HTTP Client', () => {
276276

277277
axiosInstance.get('/test').catch(() => {
278278
// Plugin should be called for the error
279+
// eslint-disable-next-line no-unused-expressions
279280
expect(onResponseCalled).to.be.true
281+
// eslint-disable-next-line no-unused-expressions
280282
expect(receivedError).to.exist
283+
// eslint-disable-next-line no-unused-expressions
281284
expect(receivedError.response).to.exist
285+
// eslint-disable-next-line no-unused-expressions
282286
expect(receivedError.response.status).to.equal(500)
283287
done()
284288
}).catch((err) => {

0 commit comments

Comments
 (0)