Skip to content

Commit

Permalink
Lint tests for checkStatus test.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Dec 7, 2023
1 parent c2f8ef7 commit 7d694a0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/10-verify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,27 +470,27 @@ describe('verify API (credentials)', () => {
}
result.verified.should.be.false;
});
it('should not run "checkStatus" on a vc without a "credentialStatus" property',
async () => {
const credential = jsonld.clone(mockCredential);
const verifiableCredential = await vc.issue({
credential,
suite,
documentLoader
});
const result = await vc.verifyCredential({
credential: verifiableCredential,
controller: assertionController,
suite,
documentLoader,
// ensure any checkStatus call will fail verification
checkStatus: async () => ({verified: false})
});
if(result.error) {
throw result.error;
}
result.verified.should.be.true;
it('should not run "checkStatus" on a vc without a ' +
'"credentialStatus" property', async () => {
const credential = jsonld.clone(mockCredential);
const verifiableCredential = await vc.issue({
credential,
suite,
documentLoader
});
const result = await vc.verifyCredential({
credential: verifiableCredential,
controller: assertionController,
suite,
documentLoader,
// ensure any checkStatus call will fail verification
checkStatus: async () => ({verified: false})
});
if(result.error) {
throw result.error;
}
result.verified.should.be.true;
});
it('should fail to verify a changed derived vc', async () => {
const proofId = `urn:uuid:${uuid()}`;
// setup ecdsa-sd-2023 suite for signing selective disclosure VCs
Expand Down

0 comments on commit 7d694a0

Please sign in to comment.