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

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

Loading…
Cancel
Save