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

initiate provider
pull/7/head
Aniket 5 years ago committed by GitHub
commit b44aa5447e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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