tests working

pull/741/head
aniket-engg 4 years ago
parent 5745e9dac4
commit 96fabf9f1d
  1. 9
      libs/remix-tests/src/compiler.ts
  2. 14
      libs/remix-tests/tests/testRunner.cli.spec.ts
  3. 2
      libs/remix-tests/tests/testRunner.spec.ts

@ -125,11 +125,12 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts:
} finally { } finally {
async.waterfall([ async.waterfall([
function loadCompiler(next) { function loadCompiler(next) {
const {currentCompilerUrl, evmVersion, optimize, usingWorker} = compilerConfig
compiler = new RemixCompiler() compiler = new RemixCompiler()
compiler.set('evmVersion', evmVersion) if(compilerConfig) {
compiler.set('optimize', optimize) const {currentCompilerUrl, evmVersion, optimize, usingWorker} = compilerConfig
// compiler.loadVersion(usingWorker, currentCompilerUrl) compiler.set('evmVersion', evmVersion)
compiler.set('optimize', optimize)
}
compiler.onInternalCompilerLoaded() compiler.onInternalCompilerLoaded()
// compiler.event.register('compilerLoaded', this, function (version) { // compiler.event.register('compilerLoaded', this, function (version) {
next() next()

@ -22,13 +22,17 @@ describe('testRunner: remix-tests CLI', () => {
const expectedHelp = `Usage: remix-tests [options] [command] const expectedHelp = `Usage: remix-tests [options] [command]
Options: Options:
-V, --version output the version number -V, --version output the version number
-v, --verbose <level> run with verbosity -c, --compiler <string> set compiler version
-h, --help output usage information -e, --evm <string> set EVM version
-o, --optimize <bool> enable/disable optimization
-r, --runs <number> set runs
-v, --verbose <level> set verbosity level
-h, --help output usage information
Commands: Commands:
version output the version number version output the version number
help output usage information` help output usage information`
expect(res.stdout.toString().trim()).toBe(expectedHelp) expect(res.stdout.toString().trim()).toBe(expectedHelp)
}) })

@ -57,7 +57,7 @@ async function compileAndDeploy(filename: string, callback: Function) {
}) })
}, },
function compile(next: Function): void { function compile(next: Function): void {
compileFileOrFiles(filename, false, { accounts }, next) compileFileOrFiles(filename, false, { accounts }, null, next)
}, },
function deployAllContracts(compilationResult: compilationInterface, asts, next: Function): void { function deployAllContracts(compilationResult: compilationInterface, asts, next: Function): void {
for(const filename in asts) { for(const filename in asts) {

Loading…
Cancel
Save