Skip to content

Commit 4038368

Browse files
committed
test: correct assertion of bodyUsed
1 parent adaa6fe commit 4038368

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

test/client_credentials.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ test('processClientCredentialsResponse()', async (t) => {
252252
err instanceof lib.ResponseBodyError &&
253253
err.error === 'invalid_grant' &&
254254
err.status === 400 &&
255-
err instanceof lib.ResponseBodyError,
255+
err.response.bodyUsed === true,
256256
)
257257

258258
await lib.processClientCredentialsResponse(

test/device_flow.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ test('processDeviceCodeResponse() without ID Tokens', async (t) => {
502502
err instanceof lib.ResponseBodyError &&
503503
err.error === 'invalid_grant' &&
504504
err.status === 400 &&
505-
err instanceof lib.ResponseBodyError,
505+
err.response.bodyUsed === true,
506506
)
507507

508508
await lib.processDeviceCodeResponse(

test/introspection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ test('processIntrospectionResponse()', async (t) => {
263263
err instanceof lib.ResponseBodyError &&
264264
err.error === 'invalid_client' &&
265265
err.status === 401 &&
266-
err instanceof lib.ResponseBodyError,
266+
err.response.bodyUsed === true,
267267
)
268268

269269
await lib.processIntrospectionResponse(

test/par.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ test('processPushedAuthorizationResponse()', async (t) => {
231231
err instanceof lib.ResponseBodyError &&
232232
err.error === 'invalid_client' &&
233233
err.status === 401 &&
234-
err instanceof lib.ResponseBodyError,
234+
err.response.bodyUsed === true,
235235
)
236236

237237
await lib.processPushedAuthorizationResponse(

test/refresh_token.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ test('processRefreshTokenResponse() without ID Tokens', async (t) => {
279279
err instanceof lib.ResponseBodyError &&
280280
err.error === 'invalid_grant' &&
281281
err.status === 400 &&
282-
err instanceof lib.ResponseBodyError,
282+
err.response.bodyUsed === true,
283283
)
284284

285285
await lib.processRefreshTokenResponse(

test/revocation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ test('processRevocationResponse()', async (t) => {
142142
err instanceof lib.ResponseBodyError &&
143143
err.error === 'invalid_client' &&
144144
err.status === 401 &&
145-
err instanceof lib.ResponseBodyError,
145+
err.response.bodyUsed === true,
146146
)
147147
})

0 commit comments

Comments
 (0)