From b4a44fb882eb17207ba20a41053d9b50e3d46206 Mon Sep 17 00:00:00 2001 From: Helen Date: Wed, 22 Jan 2025 04:49:55 +0300 Subject: [PATCH 1/2] uh.test.ts --- vite-hardhat/tests/uh.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vite-hardhat/tests/uh.test.ts b/vite-hardhat/tests/uh.test.ts index c213fcb..4aec94f 100644 --- a/vite-hardhat/tests/uh.test.ts +++ b/vite-hardhat/tests/uh.test.ts @@ -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 () => { @@ -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'); } From e2afd50d8c66aec0695cd0aab92524e08f3dff49 Mon Sep 17 00:00:00 2001 From: Helen Date: Wed, 22 Jan 2025 04:52:29 +0300 Subject: [PATCH 2/2] up.test.ts --- vite-hardhat/tests/up.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vite-hardhat/tests/up.test.ts b/vite-hardhat/tests/up.test.ts index 5a95095..e0d4557 100644 --- a/vite-hardhat/tests/up.test.ts +++ b/vite-hardhat/tests/up.test.ts @@ -27,12 +27,12 @@ describe('UltraPlonk', () => { 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 verify valid proof for correct input on a smart contract', async () => { @@ -43,7 +43,7 @@ describe('UltraPlonk', () => { bytesToHex(correctProof.proof), correctProof.publicInputs as `0x${string}`[], ]); - expect(res).toBeTrue; + expect(res).toBe(true); }); test('Should fail to generate valid proof for incorrect input', async () => { @@ -52,7 +52,7 @@ describe('UltraPlonk', () => { 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'); }