Skip to content

Commit

Permalink
test: extra assertion for proof
Browse files Browse the repository at this point in the history
  • Loading branch information
phanshiyu committed Apr 27, 2024
1 parent c92b120 commit 8f07248
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/4.0/__tests__/wrap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,12 @@ describe("V4.0 wrap document", () => {
const wrapped = await wrapDocument(genericW3cVc as unknown as V4Document);
const parsedResults = V4WrappedDocument.pick({ "@context": true, type: true }).passthrough().safeParse(wrapped);
expect(parsedResults.success).toBe(true);
expect(wrapped.proof.merkleRoot.length).toBe(64);
expect(wrapped.proof.privacy.obfuscated).toEqual([]);
expect(wrapped.proof.proofPurpose).toBe("assertionMethod");
expect(wrapped.proof.proofs).toEqual([]);
expect(wrapped.proof.salts.length).toBeGreaterThan(0);
expect(wrapped.proof.targetHash.length).toBe(64);
expect(wrapped.proof.type).toBe("OpenAttestationMerkleProofSignature2018");
});
});

0 comments on commit 8f07248

Please sign in to comment.