Commit 7599a74b authored by aniket-engg's avatar aniket-engg

tests with worker

parent bbab1f01
......@@ -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()
// });
......
......@@ -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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment