Merge pull request #377 from ethereum/remix-testsCLI

remix-tests as CLI should work fine
libsVersionUpdate
yann300 4 years ago committed by GitHub
commit f2b4694373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      libs/remix-tests/src/run.ts
  2. 2
      libs/remix-tests/src/runTestFiles.ts

@ -1,5 +1,6 @@
import commander from 'commander'
import Web3 from 'web3';
import path from 'path'
import { runTestFiles } from './runTestFiles'
import fs from './fileSystem'
import { Provider } from '@remix-project/remix-simulator'
@ -20,7 +21,7 @@ function mapVerbosity (v: number) {
}
return levels[v]
}
const version = require('../../../package.json').version
const version = require('../package.json').version
commander.version(version)
@ -58,7 +59,7 @@ commander
}
const isDirectory = fs.lstatSync(filename).isDirectory()
runTestFiles(filename, isDirectory, web3)
runTestFiles(path.resolve(filename), isDirectory, web3)
})
if (!process.argv.slice(2).length) {

@ -106,7 +106,7 @@ export function runTestFiles(filepath: string, isDirectory: boolean, web3: Web3,
} else if (result.type === 'testPass') {
signale.result(result.value)
} else if (result.type === 'testFailure') {
signale.result(result.value.red)
signale.error(result.value.red)
errors.push(result)
}
}

Loading…
Cancel
Save