From 8533171348a343cd23afa8b2b53242154e4bcd66 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 24 Oct 2023 11:37:12 +0200 Subject: [PATCH] fix sol unit test --- libs/remix-tests/src/runTestFiles.ts | 4 ++-- libs/remix-tests/src/runTestSources.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-tests/src/runTestFiles.ts b/libs/remix-tests/src/runTestFiles.ts index acf84cb45cd..3ac058857b6 100644 --- a/libs/remix-tests/src/runTestFiles.ts +++ b/libs/remix-tests/src/runTestFiles.ts @@ -84,10 +84,10 @@ export function runTestFiles (filepath: string, isDirectory: boolean, web3: Web3 // accept deployment params from UI if (err.message.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.message, severity: 'error' }]) // IDE expects errors in array + if (error) next([{ message: 'contract deployment failed after trying twice: ' + error.innerError || error.message, severity: 'error' }]) // IDE expects errors in array else next(null, compilationResult, contracts) }) - } else { next([{ message: 'contract deployment failed: ' + err.message, severity: 'error' }]) } // IDE expects errors in array + } else { next([{ message: 'contract deployment failed: ' + err.innerError || err.message, 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 f6cb8cbcf33..7b97b2851c9 100644 --- a/libs/remix-tests/src/runTestSources.ts +++ b/libs/remix-tests/src/runTestSources.ts @@ -64,10 +64,10 @@ export class UnitTestRunner { // accept deployment params from UI if (err.message.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.message, severity: 'error' }]) // IDE expects errors in array + if (error) next([{ message: 'contract deployment failed after trying twice: ' + error.innerError || error.message, severity: 'error' }]) // IDE expects errors in array else next(null, compilationResult, contracts) }) - } else { next([{ message: 'contract deployment failed: ' + err.message, severity: 'error' }]) } // IDE expects errors in array + } else { next([{ message: 'contract deployment failed: ' + err.innerError || err.message, severity: 'error' }]) } // IDE expects errors in array } else { next(null, compilationResult, contracts) } }) },