Merge pull request #1384 from ethereum/tests-error

catch and return deployment error in remix-tests
pull/7/head
yann300 5 years ago committed by GitHub
commit 80c0b9d9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      remix-tests/src/deployer.ts
  2. 2
      remix-tests/src/runTestSources.ts

@ -102,7 +102,8 @@ export function deployAll(compileResult: object, web3: Web3, callback) {
let funAbi = null // no need to set the abi for encoding the constructor
let params = '' // we suppose that the test contract does not have any param in the constructor
remixLib.execution.txFormat.encodeConstructorCallAndDeployLibraries(contractName, contract.raw, compileResult, params, funAbi, encodeDataFinalCallback, encodeDataStepCallback, encodeDataDeployLibraryCallback)
}, function () {
}, function (err) {
if(err) next(err)
next(null, contracts)
})
}

@ -51,7 +51,7 @@ export async function runTestSources(contractSources: SrcIfc, versionUrl: string
}
deployAll(compilationResult, web3, (err, contracts) => {
if (err) {
next(err)
next([{message: 'contract deployment failed: ' + err.message, severity: 'error'}]) // IDE expects errors in array
}
next(null, compilationResult, contracts)

Loading…
Cancel
Save