From f965fc83c5b8fd09f654ab004088f1198444b0c1 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 3 Dec 2024 11:46:29 +0000 Subject: [PATCH] chore: fix tests in `noirc_abi_wasm` --- tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts | 6 +++--- tooling/noirc_abi_wasm/test/node/abi_encode.test.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts b/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts index 77903ea8ddd..ac18495919c 100644 --- a/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts +++ b/tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts @@ -15,8 +15,8 @@ it('recovers original inputs when abi encoding and decoding', async () => { const foo: Field = inputs.foo as Field; const bar: Field[] = inputs.bar as Field[]; expect(BigInt(decoded_inputs.inputs.foo)).to.be.equal(BigInt(foo)); - expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0])); - expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1])); - expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2])); + expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0].toString())); + expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1].toString())); + expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2].toString())); expect(decoded_inputs.return_value).to.be.null; }); diff --git a/tooling/noirc_abi_wasm/test/node/abi_encode.test.ts b/tooling/noirc_abi_wasm/test/node/abi_encode.test.ts index 4bb46f1ddd1..e87618d84da 100644 --- a/tooling/noirc_abi_wasm/test/node/abi_encode.test.ts +++ b/tooling/noirc_abi_wasm/test/node/abi_encode.test.ts @@ -11,8 +11,8 @@ it('recovers original inputs when abi encoding and decoding', async () => { const foo: Field = inputs.foo as Field; const bar: Field[] = inputs.bar as Field[]; expect(BigInt(decoded_inputs.inputs.foo)).to.be.equal(BigInt(foo)); - expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0])); - expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1])); - expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2])); + expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0].toString())); + expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1].toString())); + expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2].toString())); expect(decoded_inputs.return_value).to.be.null; });