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
d02bd839
Unverified
Commit
d02bd839
authored
Sep 30, 2019
by
yann300
Committed by
GitHub
Sep 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2376 from ethereum/testCompilerWithWorker
test compiler load using worker
parents
002f7d94
424ee067
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
compile-tab.js
src/app/tabs/compile-tab.js
+5
-0
test-tab.js
src/app/tabs/test-tab.js
+7
-2
No files found.
src/app/tabs/compile-tab.js
View file @
d02bd839
...
...
@@ -191,6 +191,11 @@ class CompileTab extends ViewPlugin {
return
this
.
compileTabLogic
.
compileFile
(
fileName
)
}
// This function is used for passing the compiler remix-tests
getCurrentVersion
()
{
return
this
.
compilerContainer
.
data
.
selectedVersion
}
/*********
* SUB-COMPONENTS
*/
...
...
src/app/tabs/test-tab.js
View file @
d02bd839
...
...
@@ -28,6 +28,7 @@ module.exports = class TestTab extends ViewPlugin {
this
.
data
=
{}
this
.
appManager
=
appManager
this
.
renderer
=
renderer
this
.
baseurl
=
'https://solc-bin.ethereum.org/bin'
appManager
.
event
.
on
(
'activate'
,
(
name
)
=>
{
if
(
name
===
'solidity'
)
this
.
updateRunAction
(
fileManager
.
currentFile
())
})
...
...
@@ -151,7 +152,9 @@ module.exports = class TestTab extends ViewPlugin {
return
new
Promise
((
resolve
,
reject
)
=>
{
let
runningTest
=
{}
runningTest
[
path
]
=
{
content
}
remixTests
.
runTestSources
(
runningTest
,
()
=>
{},
()
=>
{},
(
error
,
result
)
=>
{
let
currentCompilerUrl
=
this
.
baseurl
+
'/'
+
this
.
compileTab
.
getCurrentVersion
()
let
usingWorker
=
this
.
compileTab
.
compilerContainer
.
browserSupportWorker
()
remixTests
.
runTestSources
(
runningTest
,
currentCompilerUrl
,
usingWorker
,
()
=>
{},
()
=>
{},
(
error
,
result
)
=>
{
if
(
error
)
return
reject
(
error
)
resolve
(
result
)
},
(
url
,
cb
)
=>
{
...
...
@@ -165,7 +168,9 @@ module.exports = class TestTab extends ViewPlugin {
this
.
fileManager
.
getFile
(
testFilePath
).
then
((
content
)
=>
{
var
runningTest
=
{}
runningTest
[
testFilePath
]
=
{
content
}
remixTests
.
runTestSources
(
runningTest
,
(
result
)
=>
{
this
.
testCallback
(
result
)
},
(
_err
,
result
,
cb
)
=>
{
this
.
resultsCallback
(
_err
,
result
,
cb
)
},
(
error
,
result
)
=>
{
let
currentCompilerUrl
=
this
.
baseurl
+
'/'
+
this
.
compileTab
.
getCurrentVersion
()
let
usingWorker
=
this
.
compileTab
.
compilerContainer
.
browserSupportWorker
()
remixTests
.
runTestSources
(
runningTest
,
currentCompilerUrl
,
usingWorker
,
(
result
)
=>
{
this
.
testCallback
(
result
)
},
(
_err
,
result
,
cb
)
=>
{
this
.
resultsCallback
(
_err
,
result
,
cb
)
},
(
error
,
result
)
=>
{
this
.
updateFinalResult
(
error
,
result
,
testFilePath
)
this
.
loading
.
hidden
=
true
callback
(
error
)
...
...
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