From fe1c67671e88096bf35d903cb769686bc45b8fc0 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 23 Aug 2018 10:28:31 -0400 Subject: [PATCH 1/2] add version & help options --- remix-tests/src/run.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/remix-tests/src/run.js b/remix-tests/src/run.js index c06c1aace5..2412c9cf70 100644 --- a/remix-tests/src/run.js +++ b/remix-tests/src/run.js @@ -20,10 +20,20 @@ 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() +}) + // get current version -const pjson = require('../package.json') commander - .version(pjson.version) .option('-v, --verbose ', 'run with verbosity', mapVerbosity) .action(function (filename) { // Console message From 7820a47964cb3cbe1833ea4451cc1771c2993886 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 28 Aug 2018 09:30:34 -0400 Subject: [PATCH 2/2] fix linting --- remix-tests/src/run.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/remix-tests/src/run.js b/remix-tests/src/run.js index 2412c9cf70..568a36f089 100644 --- a/remix-tests/src/run.js +++ b/remix-tests/src/run.js @@ -32,6 +32,16 @@ commander.command('help').description('output usage information').action(functio 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 commander .option('-v, --verbose ', 'run with verbosity', mapVerbosity)