Skip to content

Commit 58ffbc4

Browse files
committed
add assertion expectation
1 parent 32c8d17 commit 58ffbc4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/sdk-middleware-http/test/http.spec.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ describe('Http', () => {
102102
httpMiddleware(next)(request, response)
103103
}))
104104

105-
test('execute a get request with getAbortController timeout (success)', () =>
105+
test('execute a get request with getAbortController timeout (success)', () => {
106+
expect.assertions(1)
106107
new Promise((resolve, reject) => {
107108
const request = createTestRequest({
108109
uri: '/foo/bar',
@@ -132,7 +133,7 @@ describe('Http', () => {
132133
.reply(200, { foo: 'bar' })
133134

134135
httpMiddleware(next)(request, response)
135-
}))
136+
})})
136137

137138
test('execute a get request with short timeout (fail)', () =>
138139
new Promise((resolve, reject) => {
@@ -166,8 +167,9 @@ describe('Http', () => {
166167
httpMiddleware(next)(request, response)
167168
}))
168169

169-
test('execute a get request with getAbortController short timeout (fail)', () =>
170-
new Promise((resolve, reject) => {
170+
test('execute a get request with getAbortController short timeout (fail)', () => {
171+
expect.assertions(1)
172+
return new Promise((resolve, reject) => {
171173
const request = createTestRequest({
172174
uri: '/foo/bar',
173175
})
@@ -196,7 +198,7 @@ describe('Http', () => {
196198
.reply(200, { foo: 'bar' })
197199

198200
httpMiddleware(next)(request, response)
199-
}))
201+
})})
200202

201203
test('execute a request with timeout and client re-use', () =>
202204
new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)