Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint issues. #85

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/10-vcdm2.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,13 @@ describe('Issuer', function() {
);
await assert.rejects(endpoints.issue(require(
'./input/credential-issuer-nonurl-fail.json')),
'Failed to reject a numeric issuer identifier.');
'Failed to reject a numeric issuer identifier.');
await assert.rejects(endpoints.issue(require(
'./input/credential-issuer-object-no-id-fail.json')),
'Failed to reject an issuer with an empty object as the value.');
'Failed to reject an issuer with an empty object as the value.');
await assert.rejects(endpoints.issue(require(
'./input/credential-issuer-object-id-not-url-fail.json')),
'Failed to reject a issuer object containing a numeric identifier.');
'Failed to reject a issuer object containing a numeric identifier.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Failed to reject a issuer object containing a numeric identifier.');
'Failed to reject an issuer object containing a numeric identifier.');

});
});
}
Expand Down
8 changes: 4 additions & 4 deletions tests/TestEndpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class TestEndpoints {
async issue(credential) {
const {issuer} = this;
const issueBody = createRequestBody({issuer, vc: credential});
var response = await post(issuer, issueBody);
return response?.verifiableCredential || response;
const response = await post(issuer, issueBody);
return response?.verifiableCredential || response;
}
async createVp({presentation, options = {}}) {
return createVp({presentation, options});
Expand All @@ -41,7 +41,7 @@ return response?.verifiableCredential || response;
return result;
}
async verifyVp(vp, options = {checks: []}) {
if (this.vpVerifier === null) {
if(this.vpVerifier === null) {
return null;
}
const body = {
Expand Down Expand Up @@ -90,4 +90,4 @@ export async function post(endpoint, object) {
throw new Error('Redirect not supported');
}
return result;
}
}
2 changes: 1 addition & 1 deletion tests/mock.data.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const validVc = require('./validVc.json');
export const createRequestBody = ({issuer, vc = validVc}) => {
const {settings: {id, options}} = issuer;
const credential = klona(vc);
if (typeof credential.issuer === 'object') {
if(typeof credential.issuer === 'object') {
credential.issuer.id = credential.issuer?.id || id;
} else {
credential.issuer = credential?.issuer || id;
Expand Down