deno.land / x / oauth4webapi@v1.2.2 / test / issue-15.test.ts
123456789101112131415161718192021// see https://github.com/panva/oauth4webapi/issues/15
import test from 'ava'import { issuer, client, getResponse } from './_setup.js'import * as lib from '../src/index.js'
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), lib.processDeviceCodeResponse(issuer, client, response), lib.processClientCredentialsResponse(issuer, client, response), lib.processRefreshTokenResponse(issuer, client, response), ]), )})
Version Info