remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/run.js

23 lines
671 B

const commander = require('commander')
const Web3 = require('web3')
const RemixTests = require('./index.js')
const fs = require('fs')
7 years ago
const Provider = require('./src/provider.js')
7 years ago
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)
})
7 years ago
if (!process.argv.slice(2).length) {
console.log('please specify filename')
7 years ago
}
commander.parse(process.argv)