Skip to content

Commit

Permalink
fix(DEVX-363): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lojzatran committed Dec 15, 2024
1 parent 4c8294b commit b79c7ed
Show file tree
Hide file tree
Showing 3 changed files with 7,796 additions and 7,276 deletions.
2 changes: 1 addition & 1 deletion packages/sdk-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"common-tags": "1.8.2",
"dotenv": "16.4.5",
"jest": "29.7.0",
"nock": "12.0.3",
"nock": "^14.0.0-beta.19",
"organize-imports-cli": "0.10.0"
},
"scripts": {
Expand Down
22 changes: 6 additions & 16 deletions packages/sdk-client/test/http.test/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ describe('Http', () => {
body: { foo: 'bar' },
statusCode: 200,
headers: {
'content-type': ['application/json'],
'content-type': 'application/json',
},
})
resolve()
Expand Down Expand Up @@ -685,9 +685,7 @@ describe('Http', () => {
expect(res.error.name).toBe('NetworkError')
expect(res.error.headers).toBeUndefined()
expect(res.error.originalRequest).toBeUndefined()
expect(res.error.message).toBe(
`request to ${testHost}/foo/bar failed, reason: Connection timeout`
)
expect(res.error.message).toBe('Connection timeout')
expect(res.body).toBeUndefined()
expect(res.statusCode).toBe(0)
resolve()
Expand Down Expand Up @@ -717,9 +715,7 @@ describe('Http', () => {
expect(res.error.name).toBe('NetworkError')
expect(res.error.headers).toBeUndefined()
expect(res.error.originalRequest).toBeDefined()
expect(res.error.message).toBe(
`request to ${testHost}/foo/bar failed, reason: Connection timeout`
)
expect(res.error.message).toBe('Connection timeout')
expect(res.body).toBeUndefined()
expect(res.statusCode).toBe(0)
resolve()
Expand Down Expand Up @@ -1053,9 +1049,7 @@ describe('Http', () => {
expect(res.error.name).toBe('NetworkError')
expect(res.error.headers).toBeUndefined()
expect(res.error.originalRequest).toBeDefined()
expect(res.error.message).toBe(
`request to ${testHost}/foo/bar failed, reason: Connection timeout`
)
expect(res.error.message).toBe(`Connection timeout`)
expect(res.body).toBeUndefined()
expect(res.statusCode).toBe(0)
resolve()
Expand Down Expand Up @@ -1086,9 +1080,7 @@ describe('Http', () => {
expect(res.error.headers).toBeUndefined()
expect(res.error.originalRequest).toBeDefined()
expect(res.error.retryCount).toBe(2)
expect(res.error.message).toBe(
`request to ${testHost}/foo/bar failed, reason: Connection timeout`
)
expect(res.error.message).toBe('Connection timeout')
expect(res.body).toBeUndefined()
expect(res.statusCode).toBe(0)
resolve()
Expand Down Expand Up @@ -1349,9 +1341,7 @@ describe('Http', () => {
expect(res.error.headers).toBeUndefined()
expect(res.error.originalRequest).toBeDefined()
expect(res.error.retryCount).toBe(2)
expect(res.error.message).toBe(
`request to ${testHost}/foo/bar failed, reason: Connection timeout`
)
expect(res.error.message).toBe('Connection timeout')
expect(res.body).toBeUndefined()
expect(res.statusCode).toBe(0)
resolve()
Expand Down
Loading

0 comments on commit b79c7ed

Please sign in to comment.