|
|
|
@ -20,10 +20,30 @@ function mapVerbosity (v) { |
|
|
|
|
} |
|
|
|
|
return levels[v] |
|
|
|
|
} |
|
|
|
|
const version = require('../package.json').version |
|
|
|
|
|
|
|
|
|
commander.version(version) |
|
|
|
|
|
|
|
|
|
commander.command('version').description('output the version number').action(function () { |
|
|
|
|
console.log(version) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
commander.command('help').description('output usage information').action(function () { |
|
|
|
|
commander.help() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
commander.action(function (filename) { |
|
|
|
|
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'))
|
|
|
|
|
|
|
|
|
|
let isDirectory = fs.lstatSync(filename).isDirectory() |
|
|
|
|
RemixTests.runTestFiles(filename, isDirectory, web3) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// get current version
|
|
|
|
|
const pjson = require('../package.json') |
|
|
|
|
commander |
|
|
|
|
.version(pjson.version) |
|
|
|
|
.option('-v, --verbose <level>', 'run with verbosity', mapVerbosity) |
|
|
|
|
.action(function (filename) { |
|
|
|
|
// Console message
|
|
|
|
|