Commit 7409c3aa authored by Iuri Matias's avatar Iuri Matias

move determine test contracts into own method in waterfall

parent 3275f1b0
...@@ -18,6 +18,10 @@ var runTestFiles = function(filepath, isDirectory, web3) { ...@@ -18,6 +18,10 @@ var runTestFiles = function(filepath, isDirectory, web3) {
next(err) next(err)
} }
next(null, compilationResult, contracts)
})
},
function determineTestContractsToRun(compilationResult, contracts, next) {
let contractsToTest = [] let contractsToTest = []
if (isDirectory) { if (isDirectory) {
fs.readdirSync(filepath).forEach(filename => { fs.readdirSync(filepath).forEach(filename => {
...@@ -33,7 +37,6 @@ var runTestFiles = function(filepath, isDirectory, web3) { ...@@ -33,7 +37,6 @@ var runTestFiles = function(filepath, isDirectory, web3) {
} }
next(null, contractsToTest, contracts) next(null, contractsToTest, contracts)
})
}, },
function runTests (contractsToTest, contracts, next) { function runTests (contractsToTest, contracts, next) {
var testCallback = function (result) { var testCallback = function (result) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment