diff --git a/libs/remix-tests/src/compiler.ts b/libs/remix-tests/src/compiler.ts index 4039ef803b..df771f1b4a 100644 --- a/libs/remix-tests/src/compiler.ts +++ b/libs/remix-tests/src/compiler.ts @@ -125,11 +125,12 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts: } finally { async.waterfall([ function loadCompiler(next) { - const {currentCompilerUrl, evmVersion, optimize, usingWorker} = compilerConfig compiler = new RemixCompiler() - compiler.set('evmVersion', evmVersion) - compiler.set('optimize', optimize) - // compiler.loadVersion(usingWorker, currentCompilerUrl) + if(compilerConfig) { + const {currentCompilerUrl, evmVersion, optimize, usingWorker} = compilerConfig + compiler.set('evmVersion', evmVersion) + compiler.set('optimize', optimize) + } compiler.onInternalCompilerLoaded() // compiler.event.register('compilerLoaded', this, function (version) { next() diff --git a/libs/remix-tests/tests/testRunner.cli.spec.ts b/libs/remix-tests/tests/testRunner.cli.spec.ts index a203a0d0f5..7708b3bf7d 100644 --- a/libs/remix-tests/tests/testRunner.cli.spec.ts +++ b/libs/remix-tests/tests/testRunner.cli.spec.ts @@ -22,13 +22,17 @@ describe('testRunner: remix-tests CLI', () => { const expectedHelp = `Usage: remix-tests [options] [command] Options: - -V, --version output the version number - -v, --verbose run with verbosity - -h, --help output usage information + -V, --version output the version number + -c, --compiler set compiler version + -e, --evm set EVM version + -o, --optimize enable/disable optimization + -r, --runs set runs + -v, --verbose set verbosity level + -h, --help output usage information Commands: - version output the version number - help output usage information` + version output the version number + help output usage information` expect(res.stdout.toString().trim()).toBe(expectedHelp) }) diff --git a/libs/remix-tests/tests/testRunner.spec.ts b/libs/remix-tests/tests/testRunner.spec.ts index ce4032f614..f545c87d44 100644 --- a/libs/remix-tests/tests/testRunner.spec.ts +++ b/libs/remix-tests/tests/testRunner.spec.ts @@ -57,7 +57,7 @@ async function compileAndDeploy(filename: string, callback: Function) { }) }, function compile(next: Function): void { - compileFileOrFiles(filename, false, { accounts }, next) + compileFileOrFiles(filename, false, { accounts }, null, next) }, function deployAllContracts(compilationResult: compilationInterface, asts, next: Function): void { for(const filename in asts) {