Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
7db7b758
Commit
7db7b758
authored
Jan 24, 2020
by
Aniket-Engg
Committed by
Liana Husikyan
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass compiler configuration to remix-tests
parent
9d6d6c98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
compile-tab.js
src/app/tabs/compile-tab.js
+9
-0
test-tab.js
src/app/tabs/test-tab.js
+19
-6
No files found.
src/app/tabs/compile-tab.js
View file @
7db7b758
...
...
@@ -200,6 +200,15 @@ class CompileTab extends ViewPlugin {
return
this
.
compilerContainer
.
data
.
selectedVersion
}
// This function is used for passing the compiler configuration to 'remix-tests'
getCurrentCompilerConfig
()
{
return
{
currentVersion
:
this
.
compilerContainer
.
data
.
selectedVersion
,
evmVersion
:
this
.
compileTabLogic
.
evmVersion
,
optimize
:
this
.
compileTabLogic
.
optimize
}
}
/*********
* SUB-COMPONENTS
*/
...
...
src/app/tabs/test-tab.js
View file @
7db7b758
...
...
@@ -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
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment