Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge b164f5a into 95101d7
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseese committed Sep 24, 2020
2 parents 95101d7 + b164f5a commit 51918cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/helpers/contract/compileAndDeploy.js
Expand Up @@ -33,6 +33,11 @@ function compile(mainContractName, contractFileNames = [], contractSubdirectory,

const result = JSON.parse(solc.compile(JSON.stringify(input)));

if (result.errors && result.errors.some((error) => error.severity === "error")) {
const errorMessages = result.errors.map((error) => error.formattedMessage);
throw new Error(`Could not compile test contracts:\n${errorMessages.join("")}`);
}

const _mainContractName = mainContractName.endsWith(".sol")
? mainContractName.replace(/\.sol$/i, "")
: mainContractName;
Expand Down

0 comments on commit 51918cd

Please sign in to comment.