Skip to content

Commit

Permalink
Fix typo in test helpers: "issuerOptions" => "issueOptions".
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed May 14, 2024
1 parent 849ee5d commit dec36d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/mocha/40-did-web-issuer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}))
Expand Down Expand Up @@ -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 =
Expand Down
12 changes: 6 additions & 6 deletions test/mocha/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -496,23 +496,23 @@ 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({
cryptosuites: statusOptions.cryptosuites,
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)}`;

Expand Down

0 comments on commit dec36d3

Please sign in to comment.