tests with worker

pull/7/head
aniket-engg 5 years ago
parent bbab1f01c2
commit 7599a74b89
  1. 4
      remix-tests/src/compiler.ts
  2. 4
      remix-tests/src/runTestSources.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()
// });

@ -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) => {

Loading…
Cancel
Save