Skip to content

Commit

Permalink
fix: verify proof test
Browse files Browse the repository at this point in the history
  • Loading branch information
tplooker committed Apr 28, 2020
1 parent d54056c commit 09ea0f6
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions __tests__/bbsSignature/verifyProof.bbsSignature.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,28 +149,8 @@ describe("bbsSignature", () => {
};
const proof = createProof(proofRequest);

let proofMessages = ["Message2", "Message3"];
let request: BbsVerifyProofRequest = {
proof,
publicKey: bbsPublicKey,
messageCount: 4,
messages: proofMessages,
nonce,
revealed: [1, 2],
};

proofMessages = ["Message2"];
request = {
proof,
publicKey: bbsPublicKey,
messageCount: 4,
messages: proofMessages,
nonce,
revealed: [1],
};

proofMessages = ["BadMessage9"];
request = {
const proofMessages = ["BadMessage9"];
const request = {
proof,
publicKey: bbsPublicKey,
messageCount: 4,
Expand All @@ -180,17 +160,6 @@ describe("bbsSignature", () => {
};

expect(verifyProof(request).verified).toBeFalsy();

proofMessages = ["Message1"];
request = {
proof,
publicKey: bbsPublicKey,
messageCount: 4,
messages: proofMessages,
nonce,
revealed: [0],
};
expect(verifyProof(request).verified).toBeTruthy();
});

describe("blsVerifyProof", () => {
Expand Down

0 comments on commit 09ea0f6

Please sign in to comment.