From 5bdf6d947d2ce981c23d018b0ad9a73054158af7 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 14 Oct 2024 15:01:40 +0200 Subject: [PATCH] fix test --- libs/remix-tests/src/runTestFiles.ts | 6 +++--- libs/remix-tests/src/runTestSources.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/remix-tests/src/runTestFiles.ts b/libs/remix-tests/src/runTestFiles.ts index 9b1c2bde00..eac97d350b 100644 --- a/libs/remix-tests/src/runTestFiles.ts +++ b/libs/remix-tests/src/runTestFiles.ts @@ -82,12 +82,12 @@ export function runTestFiles (filepath: string, isDirectory: boolean, web3: Web3 // If contract deployment fails because of 'Out of Gas' error, try again with double gas // This is temporary, should be removed when remix-tests will have a dedicated UI to // accept deployment params from UI - if (err.message.includes('The contract code couldn\'t be stored, please check your gas limit')) { + if (err.error.includes('The contract code couldn\'t be stored, please check your gas limit')) { deployAll(compilationResult, web3, accounts, true, null, (error, contracts) => { - if (error) next([{ message: 'contract deployment failed after trying twice: ' + error.innerError || error.message, severity: 'error' }]) // IDE expects errors in array + if (error) next([{ message: 'contract deployment failed after trying twice: ' + (error.innerError || error.error), severity: 'error' }]) // IDE expects errors in array else next(null, compilationResult, contracts) }) - } else { next([{ message: 'contract deployment failed: ' + err.innerError || err.message, severity: 'error' }]) } // IDE expects errors in array + } else { next([{ message: 'contract deployment failed: ' + (err.innerError || err.error), severity: 'error' }]) } // IDE expects errors in array } else { next(null, compilationResult, contracts) } }) }, diff --git a/libs/remix-tests/src/runTestSources.ts b/libs/remix-tests/src/runTestSources.ts index 3464ddb037..5d71f9b7b9 100644 --- a/libs/remix-tests/src/runTestSources.ts +++ b/libs/remix-tests/src/runTestSources.ts @@ -62,12 +62,12 @@ export class UnitTestRunner { // If contract deployment fails because of 'Out of Gas' error, try again with double gas // This is temporary, should be removed when remix-tests will have a dedicated UI to // accept deployment params from UI - if (err.message.includes('The contract code couldn\'t be stored, please check your gas limit')) { + if (err.error.includes('The contract code couldn\'t be stored, please check your gas limit')) { deployAll(compilationResult, this.web3, this.testsAccounts, true, deployCb, (error, contracts) => { - if (error) next([{ message: 'contract deployment failed after trying twice: ' + error.innerError || error.message, severity: 'error' }]) // IDE expects errors in array + if (error) next([{ message: 'contract deployment failed after trying twice: ' + (error.innerError || error.error), severity: 'error' }]) // IDE expects errors in array else next(null, compilationResult, contracts) }) - } else { next([{ message: 'contract deployment failed: ' + err.innerError || err.message, severity: 'error' }]) } // IDE expects errors in array + } else { next([{ message: 'contract deployment failed: ' + (err.innerError || err.error), severity: 'error' }]) } // IDE expects errors in array } else { next(null, compilationResult, contracts) } }) },