From ad83302cfaffabbac4d7b370ff5065f43414d7f4 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:35:48 +0100 Subject: [PATCH] chore: delete duplicated test (#6113) # Description ## Problem\* Resolves ## Summary\* It looks like we picked up an extra copy of some tests in this file at some point (most likely a sync) ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --- tooling/noir_js/test/node/execute.test.ts | 40 +++-------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/tooling/noir_js/test/node/execute.test.ts b/tooling/noir_js/test/node/execute.test.ts index a442b3c42df..ceac21b2860 100644 --- a/tooling/noir_js/test/node/execute.test.ts +++ b/tooling/noir_js/test/node/execute.test.ts @@ -23,43 +23,20 @@ it('executes a single-ACIR program correctly', async () => { expect(returnValue).to.be.eq('0x05'); }); -it('circuit with a fmt string assert message should fail with the resolved assertion message', async () => { +it('successfully executes a program with multiple acir circuits', async () => { const inputs = { x: '10', - y: '5', - }; - try { - await new Noir(assert_msg_runtime).execute(inputs); - } catch (error) { - const knownError = error as Error; - expect(knownError.message).to.equal('Circuit execution failed: Expected x < y but got 10 < 5'); - } -}); - -it('circuit with a raw assert payload should fail with the decoded payload', async () => { - const inputs = { - x: '7', - y: '5', }; - try { - await new Noir(assert_raw_payload_json).execute(inputs); - } catch (error) { - const knownError = error as ErrorWithPayload; - const invalidXYErrorSelector = Object.keys(assert_raw_payload_json.abi.error_types)[0]; - expect(knownError.rawAssertionPayload!.selector).to.equal(invalidXYErrorSelector); - expect(knownError.decodedAssertionPayload).to.deep.equal({ - x: '0x07', - y: '0x05', - }); - } + expect(() => new Noir(fold_fibonacci_program).execute(inputs)).to.not.throw(); }); -it('successfully executes a program with multiple acir circuits', async () => { +it('circuit with a fmt string assert message should fail with the resolved assertion message', async () => { const inputs = { x: '10', + y: '5', }; try { - await new Noir(fold_fibonacci_program).execute(inputs); + await new Noir(assert_msg_runtime).execute(inputs); } catch (error) { const knownError = error as Error; expect(knownError.message).to.equal('Circuit execution failed: Expected x < y but got 10 < 5'); @@ -84,13 +61,6 @@ it('circuit with a raw assert payload should fail with the decoded payload', asy } }); -it('successfully executes a program with multiple acir circuits', async () => { - const inputs = { - x: '10', - }; - expect(() => new Noir(fold_fibonacci_program).execute(inputs)).to.not.throw(); -}); - it('successfully decodes the return values from a program using the databus', async () => { const inputs = { x: '3',