From 11d4d371eaa46e9462b1749700d1536b8020cf77 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 2 Nov 2020 12:36:17 +0100 Subject: [PATCH] passing sources --- apps/remix-ide/src/app/tabs/test-tab.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index 58a2c1039b..b325618465 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -130,7 +130,7 @@ module.exports = class TestTab extends ViewPlugin { await this.call('editor', 'discardHighlight') } - async highlightLocation (location, fileName) { + async highlightLocation (location, runningTest, fileName) { if (location) { var split = location.split(':') var file = split[2] @@ -141,14 +141,14 @@ module.exports = class TestTab extends ViewPlugin { location = this.offsetToLineColumnConverter.offsetToLineColumn( location, parseInt(file), - fileName + runningTest ) await this.call('editor', 'discardHighlight') await this.call('editor', 'highlight', location, fileName) } } - testCallback (result) { + testCallback (result, runningTest) { this.testsOutput.hidden = false if (result.type === 'contract') { this.testSuite = result.value @@ -182,7 +182,7 @@ module.exports = class TestTab extends ViewPlugin {
this.highlightLocation(result.location, this.rawFileName)} + onclick=${() => this.highlightLocation(result.location, runningTest, this.rawFileName)} > ✘ ${result.value} Error Message: @@ -197,7 +197,7 @@ module.exports = class TestTab extends ViewPlugin {
this.highlightLocation(result.location, this.rawFileName)} + onclick=${() => this.highlightLocation(result.location, runningTest, this.rawFileName)} > ✘ ${result.value} Error Message: @@ -397,7 +397,7 @@ module.exports = class TestTab extends ViewPlugin { remixTests.runTestSources( runningTest, compilerConfig, - (result) => this.testCallback(result), + (result) => this.testCallback(result, runningTest), (_err, result, cb) => this.resultsCallback(_err, result, cb), (error, result) => { this.updateFinalResult(error, result, testFilePath)