From 7599a74b898bce2f809a88b0cc1790f0b8a313cf Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 27 Sep 2019 15:20:43 +0530 Subject: [PATCH] tests with worker --- remix-tests/src/compiler.ts | 4 ++-- remix-tests/src/runTestSources.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/remix-tests/src/compiler.ts b/remix-tests/src/compiler.ts index e84f1780b2..18cb19156a 100644 --- a/remix-tests/src/compiler.ts +++ b/remix-tests/src/compiler.ts @@ -85,7 +85,7 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts: } } -export function compileContractSources(sources: SrcIfc, importFileCb: any, opts: any, cb: Function) { +export function compileContractSources(sources: SrcIfc, versionUrl: any, usingWorker: any, importFileCb: any, opts: any, cb: Function) { let compiler, filepath: string let accounts = opts.accounts || [] // Iterate over sources keys. Inject test libraries. Inject test library import statements. @@ -105,7 +105,7 @@ export function compileContractSources(sources: SrcIfc, importFileCb: any, opts: async.waterfall([ function loadCompiler (next: Function) { compiler = new RemixCompiler(importFileCb) - compiler.onInternalCompilerLoaded() + compiler.loadVersion(usingWorker, versionUrl) // compiler.event.register('compilerLoaded', this, function (version) { next() // }); diff --git a/remix-tests/src/runTestSources.ts b/remix-tests/src/runTestSources.ts index eefa1be9ba..adb89529ce 100644 --- a/remix-tests/src/runTestSources.ts +++ b/remix-tests/src/runTestSources.ts @@ -18,7 +18,7 @@ const createWeb3Provider = async function () { return web3 } -export async function runTestSources(contractSources, testCallback, resultCallback, finalCallback, importFileCb, opts) { +export async function runTestSources(contractSources, versionUrl, usingWorker, testCallback, resultCallback, finalCallback, importFileCb, opts) { opts = opts || {} let web3 = opts.web3 || await createWeb3Provider() let accounts = opts.accounts || null @@ -31,7 +31,7 @@ export async function runTestSources(contractSources, testCallback, resultCallba }) }, function compile (next) { - compileContractSources(contractSources, importFileCb, { accounts }, next) + compileContractSources(contractSources, versionUrl, usingWorker, importFileCb, { accounts }, next) }, function deployAllContracts (compilationResult, next) { deployAll(compilationResult, web3, (err, contracts) => {