Merge pull request #1325 from ethereum/remix-tests-CLI-issue

initiate provider
pull/5370/head
Aniket 5 years ago committed by GitHub
commit 9ebfa44f23
  1. 8
      remix-tests/src/run.ts

@ -35,7 +35,7 @@ commander.command('help').description('output usage information').action(functio
// get current version
commander
.option('-v, --verbose <level>', 'run with verbosity', mapVerbosity)
.action((filename) => {
.action(async (filename) => {
// Console message
console.log(colors.white('\n\t👁\t:: Running remix-tests - Unit testing for solidity ::\t👁\n'))
// set logger verbosity
@ -44,9 +44,9 @@ commander
log.info('verbosity level set to ' + commander.verbose.blue)
}
let web3 = new Web3()
// web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'))
web3.setProvider(new Provider())
// web3.setProvider(new web3.providers.WebsocketProvider('ws://localhost:8546'))
const provider = new Provider()
await provider.init()
web3.setProvider(provider)
if (!fs.existsSync(filename)) {
console.error(filename + ' not found')

Loading…
Cancel
Save