From dec36d3ca8b76fcead45d264df69f8dc13606463 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Mon, 13 May 2024 20:16:24 -0400 Subject: [PATCH] Fix typo in test helpers: "issuerOptions" => "issueOptions". --- test/mocha/40-did-web-issuer.js | 6 +++--- test/mocha/helpers.js | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/mocha/40-did-web-issuer.js b/test/mocha/40-did-web-issuer.js index 1fe0e0e4..a0f14110 100644 --- a/test/mocha/40-did-web-issuer.js +++ b/test/mocha/40-did-web-issuer.js @@ -81,8 +81,8 @@ describe('issue using "did:web" issuer', () => { cryptosuites: suites, serviceAgent, capabilityAgent, zcaps }); - // create issuer options - const issuerOptions = { + // create issue options + const issueOptions = { issuer: did, cryptosuites: suites.map( ({name, zcapReferenceIds}) => ({name, zcapReferenceIds})) @@ -110,7 +110,7 @@ describe('issue using "did:web" issuer', () => { // create issuer instance w/ no status list options const noStatusListIssuerConfig = await helpers.createIssuerConfig({ - capabilityAgent, zcaps, issuerOptions + capabilityAgent, zcaps, issueOptions }); noStatusListIssuerId = noStatusListIssuerConfig.id; noStatusListIssuerRootZcap = diff --git a/test/mocha/helpers.js b/test/mocha/helpers.js index 7f548fef..ef5a115d 100644 --- a/test/mocha/helpers.js +++ b/test/mocha/helpers.js @@ -73,13 +73,13 @@ export async function createStatusConfig({ } export async function createIssuerConfig({ - capabilityAgent, ipAllowList, meterId, zcaps, issuerOptions, + capabilityAgent, ipAllowList, meterId, zcaps, issueOptions, suiteName = 'Ed25519Signature2020', statusListOptions, oauth2 = false } = {}) { const url = `${mockData.baseUrl}/issuers`; // issuer-specific options const configOptions = { - issueOptions: issuerOptions ?? {suiteName} + issueOptions: issueOptions ?? {suiteName} }; if(statusListOptions) { configOptions.statusListOptions = statusListOptions; @@ -496,7 +496,7 @@ export async function provisionIssuerForStatus({ // create issuer instance w/ oauth2-based authz const {suiteName} = statusOptions; - let issuerOptions; + let issueOptions; if(statusOptions.cryptosuites) { // delegate assertion method keys await delegateAssertionMethodZcaps({ @@ -504,15 +504,15 @@ export async function provisionIssuerForStatus({ serviceAgent: issuerServiceAgent, capabilityAgent, zcaps }); - // generate issuer options based on given cryptosuites - issuerOptions = { + // generate issue options based on given cryptosuites + issueOptions = { issuer: did, cryptosuites: statusOptions.cryptosuites.map( ({name, zcapReferenceIds}) => ({name, zcapReferenceIds})) }; } const issuerConfig = await createIssuerConfig( - {capabilityAgent, zcaps, suiteName, issuerOptions, oauth2: true}); + {capabilityAgent, zcaps, suiteName, issueOptions, oauth2: true}); const {id: issuerId} = issuerConfig; const issuerRootZcap = `urn:zcap:root:${encodeURIComponent(issuerId)}`;