Skip to content

Commit

Permalink
test: fix test/issue-15.test.ts on node current
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jan 16, 2024
1 parent edff8c1 commit 6479753
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/issue-15.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import test from 'ava'
import { issuer, client, getResponse } from './_setup.js'
import * as lib from '../src/index.js'

const response = getResponse(
const response = () => getResponse(
JSON.stringify({ access_token: 'foo', token_type: 'bearer', scope: '' }),
)

test('handles empty scope from the Token Endpoint', async (t) => {
await t.notThrowsAsync(() =>
Promise.all([
lib.processAuthorizationCodeOAuth2Response(issuer, client, response.clone()),
lib.processDeviceCodeResponse(issuer, client, response.clone()),
lib.processClientCredentialsResponse(issuer, client, response.clone()),
lib.processRefreshTokenResponse(issuer, client, response.clone()),
lib.processAuthorizationCodeOAuth2Response(issuer, client, response()),
lib.processDeviceCodeResponse(issuer, client, response()),
lib.processClientCredentialsResponse(issuer, client, response()),
lib.processRefreshTokenResponse(issuer, client, response()),
]),
)
})

0 comments on commit 6479753

Please sign in to comment.