From 532e4af52c234c45533cf7f95183096576b6dcc4 Mon Sep 17 00:00:00 2001 From: kvp <223931578+kvpanch@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:12:13 -0400 Subject: [PATCH] Re-enable large contracts for WASM builds The issue can not be reproduced. Enable test to track regressions --- js/emscripten/tests/node.test.mjs | 77 +++++++++++++++---------------- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/js/emscripten/tests/node.test.mjs b/js/emscripten/tests/node.test.mjs index cb6f56ef..cee61b94 100644 --- a/js/emscripten/tests/node.test.mjs +++ b/js/emscripten/tests/node.test.mjs @@ -31,50 +31,45 @@ describe('Compile Function Tests', function () { ).to.have.property('bytecode') }) - if (typeof globalThis.Bun == 'undefined') { - // Running this test with Bun on a Linux host causes: - // RuntimeError: Out of bounds memory access (evaluating 'getWasmTableEntry(index)(a1, a2, a3, a4, a5)') - // Once this issue is resolved, the test will be re-enabled. - it('should successfully compile large Solidity code', async function () { - const standardInput = loadFixture('token.json') + it('should successfully compile large Solidity code', async function () { + const standardInput = loadFixture('token.json') - const result = await compile(standardInput) - expect(result).to.be.a('string') - const output = JSON.parse(result) - expect(output).to.have.property('contracts') - expect(output.contracts['fixtures/token.sol']).to.have.property('MyToken') - expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property( - 'abi' - ) - expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property( - 'evm' - ) - expect( - output.contracts['fixtures/token.sol'].MyToken.evm - ).to.have.property('bytecode') - }) + const result = await compile(standardInput) + expect(result).to.be.a('string') + const output = JSON.parse(result) + expect(output).to.have.property('contracts') + expect(output.contracts['fixtures/token.sol']).to.have.property('MyToken') + expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property( + 'abi' + ) + expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property( + 'evm' + ) + expect( + output.contracts['fixtures/token.sol'].MyToken.evm + ).to.have.property('bytecode') + }) - it('should successfully compile a valid Solidity contract that instantiates the token contracts', async function () { - const standardInput = loadFixture('instantiate_tokens.json') + it('should successfully compile a valid Solidity contract that instantiates the token contracts', async function () { + const standardInput = loadFixture('instantiate_tokens.json') - const result = await compile(standardInput) - expect(result).to.be.a('string') - const output = JSON.parse(result) - expect(output).to.have.property('contracts') - expect( - output.contracts['fixtures/instantiate_tokens.sol'] - ).to.have.property('TokensFactory') - expect( - output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory - ).to.have.property('abi') - expect( - output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory - ).to.have.property('evm') - expect( - output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory.evm - ).to.have.property('bytecode') - }) - } + const result = await compile(standardInput) + expect(result).to.be.a('string') + const output = JSON.parse(result) + expect(output).to.have.property('contracts') + expect( + output.contracts['fixtures/instantiate_tokens.sol'] + ).to.have.property('TokensFactory') + expect( + output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory + ).to.have.property('abi') + expect( + output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory + ).to.have.property('evm') + expect( + output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory.evm + ).to.have.property('bytecode') + }) it('should throw an error for invalid Solidity code', async function () { const standardInput = loadFixture('invalid_contract_content.json')