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
3c35257e
Commit
3c35257e
authored
Aug 31, 2021
by
aniket-engg
Committed by
Aniket
Aug 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show logs for method call
parent
36f76864
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
testRunner.ts
libs/remix-tests/src/testRunner.ts
+10
-1
No files found.
libs/remix-tests/src/testRunner.ts
View file @
3c35257e
...
...
@@ -244,8 +244,15 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const
method
=
testObject
.
methods
[
func
.
name
].
apply
(
testObject
.
methods
[
func
.
name
],
[])
const
startTime
=
Date
.
now
()
if
(
func
.
constant
)
{
method
.
call
(
sendParams
).
then
((
result
)
=>
{
sendParams
=
{}
const
tagTimestamp
=
'remix_tests_tag'
+
Date
.
now
()
sendParams
.
timestamp
=
tagTimestamp
method
.
call
(
sendParams
).
then
(
async
(
result
)
=>
{
const
time
=
(
Date
.
now
()
-
startTime
)
/
1000.0
let
tagTxHash
let
hhLogs
if
(
web3
.
eth
&&
web3
.
eth
.
getHashFromTagBySimulator
)
tagTxHash
=
await
web3
.
eth
.
getHashFromTagBySimulator
(
tagTimestamp
)
if
(
web3
.
eth
&&
web3
.
eth
.
getHHLogsForTx
)
hhLogs
=
await
web3
.
eth
.
getHHLogsForTx
(
tagTxHash
)
if
(
result
)
{
const
resp
:
TestResultInterface
=
{
type
:
'testPass'
,
...
...
@@ -254,6 +261,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
time
:
time
,
context
:
testName
}
if
(
hhLogs
)
resp
.
hhLogs
=
hhLogs
testCallback
(
undefined
,
resp
)
passingNum
+=
1
timePassed
+=
time
...
...
@@ -266,6 +274,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
errMsg
:
'function returned false'
,
context
:
testName
}
if
(
hhLogs
)
resp
.
hhLogs
=
hhLogs
testCallback
(
undefined
,
resp
)
failureNum
+=
1
timePassed
+=
time
...
...
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