Skip to content

Commit

Permalink
uh.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
offensif committed Jan 22, 2025
1 parent 785432f commit b4a44fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vite-hardhat/tests/uh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ describe('UltraHonk', () => {
const input = { x: 1, y: 2 };
const { witness } = await noir.execute(input);
correctProof = await backend.generateProof(witness);
expect(correctProof.proof instanceof Uint8Array).toBeTrue;
expect(correctProof.proof instanceof Uint8Array).toBe(true);
});

test('Should verify valid proof for correct input', async () => {
const verification = await backend.verifyProof(correctProof);
expect(verification).toBeTrue;
expect(verification).toBe(true);
});

test('Should fail to generate valid proof for incorrect input', async () => {
Expand All @@ -42,7 +42,7 @@ describe('UltraHonk', () => {
const { witness } = await noir.execute(input);
const incorrectProof = await backend.generateProof(witness);
} catch (err) {
expect(err instanceof Error).toBeTrue;
expect(err instanceof Error).toBe(true);
const error = err as Error;
expect(error.message).toContain('Cannot satisfy constraint');
}
Expand Down

0 comments on commit b4a44fb

Please sign in to comment.