From ac918b8ef1fdf1cec3640f24221b2ac73049c98e Mon Sep 17 00:00:00 2001 From: Siphamandla Mjoli Date: Thu, 16 Jan 2025 22:43:37 +0200 Subject: [PATCH] update: fix issue with insufficient buffer size for cli test --- crates/solidity/src/tests/cli-tests/src/helper.ts | 3 ++- crates/solidity/src/tests/cli-tests/tests/common.test.ts | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/solidity/src/tests/cli-tests/src/helper.ts b/crates/solidity/src/tests/cli-tests/src/helper.ts index 208e9e6f..e1f7332b 100644 --- a/crates/solidity/src/tests/cli-tests/src/helper.ts +++ b/crates/solidity/src/tests/cli-tests/src/helper.ts @@ -12,7 +12,8 @@ export const executeCommand = (command: string, stdin?: string): CommandResult = const process = spawnSync(command, [], { input: stdin, shell: true, - encoding: 'utf-8' + encoding: 'utf8', + maxBuffer: 30 * 1024 * 1024 }); return { diff --git a/crates/solidity/src/tests/cli-tests/tests/common.test.ts b/crates/solidity/src/tests/cli-tests/tests/common.test.ts index 1446f87d..65fbb91e 100644 --- a/crates/solidity/src/tests/cli-tests/tests/common.test.ts +++ b/crates/solidity/src/tests/cli-tests/tests/common.test.ts @@ -4,7 +4,6 @@ import * as shell from 'shelljs'; import * as path from 'path'; - //id1762 describe("Run resolc without any options", () => { const command = 'resolc'; @@ -185,9 +184,7 @@ describe("Standard JSON compilation with path options", () => { }); it("Compiler run successful without emiting warnings", () => { - const cleanOutput = result.output.trim().replace(/[\r\n]+/g, ''); - const parsedResults = JSON.parse(cleanOutput); - console.log("result.output: ", parsedResults) + const parsedResults = JSON.parse(result.output) expect(parsedResults.errors.filter((error: { type: string; }) => error.type != 'Warning')).toEqual([]); }); });