return web3 for failed tests

pull/1573/head
aniket-engg 3 years ago committed by Aniket
parent 8fcd7bdabf
commit 80587dd670
  1. 6
      libs/remix-tests/src/testRunner.ts
  2. 1
      libs/remix-tests/src/types.ts

@ -322,7 +322,8 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
assertMethod,
returned: testEvent[3],
expected: testEvent[4],
location
location,
web3
}
if (hhLogs) resp.hhLogs = hhLogs
testCallback(undefined, resp)
@ -373,7 +374,8 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
filename: testObject.filename,
time: time,
errMsg: err.message,
context: testName
context: testName,
web3
}
testCallback(undefined, resp)
failureNum += 1

@ -37,6 +37,7 @@ export interface TestResultInterface {
expected?: string | number
location?: string
hhLogs?: []
web3?: any
}
export interface TestCbInterface {
(error: Error | null | undefined, result: TestResultInterface) : void;

Loading…
Cancel
Save