|
|
|
@ -153,8 +153,15 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
let runningTest = {} |
|
|
|
|
runningTest[path] = { content } |
|
|
|
|
let currentCompilerUrl = this.baseurl + '/' + this.compileTab.getCurrentVersion() |
|
|
|
|
remixTests.runTestSources(runningTest, currentCompilerUrl, canUseWorker(this.compileTab.getCurrentVersion()), () => {}, () => {}, (error, result) => { |
|
|
|
|
const {currentVersion, evmVersion, optimize} = this.compileTab.getCurrentCompilerConfig() |
|
|
|
|
const currentCompilerUrl = this.baseurl + '/' + currentVersion |
|
|
|
|
const compilerConfig = { |
|
|
|
|
currentCompilerUrl, |
|
|
|
|
evmVersion, |
|
|
|
|
optimize, |
|
|
|
|
usingWorker: canUseWorker(currentVersion) |
|
|
|
|
} |
|
|
|
|
remixTests.runTestSources(runningTest, compilerConfig, () => {}, () => {}, (error, result) => { |
|
|
|
|
if (error) return reject(error) |
|
|
|
|
resolve(result) |
|
|
|
|
}, (url, cb) => { |
|
|
|
@ -166,13 +173,19 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
runTest (testFilePath, callback) { |
|
|
|
|
this.loading.hidden = false |
|
|
|
|
this.fileManager.getFile(testFilePath).then((content) => { |
|
|
|
|
var runningTest = {} |
|
|
|
|
let runningTest = {} |
|
|
|
|
runningTest[testFilePath] = { content } |
|
|
|
|
let currentCompilerUrl = this.baseurl + '/' + this.compileTab.getCurrentVersion() |
|
|
|
|
const {currentVersion, evmVersion, optimize} = this.compileTab.getCurrentCompilerConfig() |
|
|
|
|
const currentCompilerUrl = this.baseurl + '/' + currentVersion |
|
|
|
|
const compilerConfig = { |
|
|
|
|
currentCompilerUrl, |
|
|
|
|
evmVersion, |
|
|
|
|
optimize, |
|
|
|
|
usingWorker: canUseWorker(currentVersion) |
|
|
|
|
} |
|
|
|
|
remixTests.runTestSources( |
|
|
|
|
runningTest, |
|
|
|
|
currentCompilerUrl, |
|
|
|
|
canUseWorker(this.compileTab.getCurrentVersion()), |
|
|
|
|
compilerConfig, |
|
|
|
|
(result) => this.testCallback(result), |
|
|
|
|
(_err, result, cb) => this.resultsCallback(_err, result, cb), |
|
|
|
|
(error, result) => { |
|
|
|
|