Skip to content

Commit

Permalink
chore: test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brummos committed Feb 14, 2024
1 parent 75961ef commit 4e33770
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/client/lib/__tests__/OpenID4VCIClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('OpenID4VCIClient should', () => {
it('should successfully construct an authorization request url', async () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client._endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
client._state.endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
const url = await client.createAuthorizationRequestUrl({
authorizationRequest: {
scope: 'openid TestCredential',
Expand All @@ -54,7 +54,7 @@ describe('OpenID4VCIClient should', () => {
it("injects 'openid' as the first scope if not provided", async () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client._endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
client._state.endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;

const url = await client.createAuthorizationRequestUrl({
pkce: {
Expand Down Expand Up @@ -85,15 +85,15 @@ describe('OpenID4VCIClient should', () => {

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client._endpointMetadata = {
client._state.endpointMetadata = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
credentialIssuerMetadata: {
authorization_endpoint: `${MOCK_URL}v1/auth/authorize`,
token_endpoint: `${MOCK_URL}/token`,
},
};
// client._endpointMetadata.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
// client._state.endpointMetadata.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;

await expect(
client.createAuthorizationRequestUrl({
Expand All @@ -110,7 +110,7 @@ describe('OpenID4VCIClient should', () => {
it('create an authorization request url with authorization_details array property', async () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client._endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
client._state.endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;

await expect(
client.createAuthorizationRequestUrl({
Expand Down Expand Up @@ -146,7 +146,7 @@ describe('OpenID4VCIClient should', () => {
it('create an authorization request url with authorization_details object property', async () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client._endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
client._state.endpointMetadata?.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;

await expect(
client.createAuthorizationRequestUrl({
Expand All @@ -173,7 +173,7 @@ describe('OpenID4VCIClient should', () => {
it('create an authorization request url with authorization_details and scope', async () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client._endpointMetadata.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;
client._state.endpointMetadata.credentialIssuerMetadata.authorization_endpoint = `${MOCK_URL}v1/auth/authorize`;

await expect(
client.createAuthorizationRequestUrl({
Expand Down

0 comments on commit 4e33770

Please sign in to comment.