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
18cb42c8
Commit
18cb42c8
authored
Apr 02, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix runTestSources
parent
3ea33627
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
runTestSources.ts
remix-tests/src/runTestSources.ts
+6
-5
No files found.
remix-tests/src/runTestSources.ts
View file @
18cb42c8
...
...
@@ -4,9 +4,10 @@ require('colors')
import
{
compileContractSources
}
from
'./compiler'
import
{
deployAll
}
from
'./deployer'
import
{
runTest
}
from
'./testRunner'
import
{
TestResultInterface
,
ResultsInterface
}
from
'./types'
import
Web3
=
require
(
'web3'
)
import
Provider
from
'remix-simulator'
import
{
Provider
}
from
'remix-simulator'
import
{
FinalResult
}
from
'./types'
const
createWeb3Provider
=
function
()
{
...
...
@@ -28,7 +29,7 @@ export function runTestSources(contractSources, testCallback, resultCallback, fi
})
},
function
compile
(
next
)
{
compileContractSources
(
contractSources
,
importFileCb
,
opts
,
next
)
compileContractSources
(
contractSources
,
importFileCb
,
{
accounts
}
,
next
)
},
function
deployAllContracts
(
compilationResult
,
next
)
{
deployAll
(
compilationResult
,
web3
,
(
err
,
contracts
)
=>
{
...
...
@@ -60,7 +61,7 @@ export function runTestSources(contractSources, testCallback, resultCallback, fi
let
totalTime
=
0
let
errors
:
any
[]
=
[]
const
_testCallback
=
function
(
result
)
{
const
_testCallback
=
function
(
err
:
Error
|
null
|
undefined
,
result
:
TestResultInterface
)
{
if
(
result
.
type
===
'testFailure'
)
{
errors
.
push
(
result
)
}
...
...
@@ -75,8 +76,8 @@ export function runTestSources(contractSources, testCallback, resultCallback, fi
cb
()
}
async
.
eachOfLimit
(
contractsToTest
,
1
,
(
contractName
,
index
,
cb
)
=>
{
runTest
(
contractName
,
contracts
(
contractName
)
,
contractsToTestDetails
[
index
],
{
accounts
},
_testCallback
,
(
err
,
result
)
=>
{
async
.
eachOfLimit
(
contractsToTest
,
1
,
(
contractName
:
string
,
index
,
cb
)
=>
{
runTest
(
contractName
,
contracts
[
contractName
]
,
contractsToTestDetails
[
index
],
{
accounts
},
_testCallback
,
(
err
,
result
)
=>
{
if
(
err
)
{
return
cb
(
err
)
}
...
...
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