Skip to content

Commit

Permalink
Improve stack traces test error when transaction reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio authored and schaable committed Sep 12, 2024
1 parent af56e77 commit ddadd4c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,16 +544,14 @@ async function runTest(
);
}

compareConsoleLogs(logger.lines, tx.consoleLogs);

const vmTraceDecoder = (provider as any)._vmTraceDecoder as VmTraceDecoder;
const decodedTrace = vmTraceDecoder.tryToDecodeMessageTrace(trace);

try {
if (tx.stackTrace === undefined) {
assert.isFalse(
trace.exit.isError(),
`Transaction ${txIndex} shouldn't have failed`
`Transaction ${txIndex} shouldn't have failed (${trace.exit.getReason()})`
);
} else {
assert.isDefined(
Expand Down Expand Up @@ -588,6 +586,8 @@ async function runTest(
throw err;
}
}

compareConsoleLogs(logger.lines, tx.consoleLogs);
}
}

Expand Down

0 comments on commit ddadd4c

Please sign in to comment.