diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx index 3791a1e5e6..57fd5f6654 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx +++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx @@ -230,7 +230,7 @@ export const SolidityUnitTesting = (props: any) => { } else if (result.type === 'testFailure') { // if (result.hhLogs && result.hhLogs.length) this.printHHLogs(result.hhLogs, result.value) if (!result.assertMethod) { - const testFailCard: any = (
this.highlightLocation(result.location, runningTests, result.filename)} @@ -242,36 +242,34 @@ export const SolidityUnitTesting = (props: any) => { Error Message: "{result.errMsg}"
) - setTestsOutput(prevCards => ([...prevCards, testFailCard])) - } - // else { - // const preposition = result.assertMethod === 'equal' || result.assertMethod === 'notEqual' ? 'to' : '' - // const method = result.assertMethod === 'ok' ? '' : result.assertMethod - // const expected = result.assertMethod === 'ok' ? '\'true\'' : result.expected - // this.testsOutput.appendChild(yo` - //
this.highlightLocation(result.location, runningTests, result.filename)} - // > - //
- // ✘ ${result.value} - // ${debugBtn} - //
- // Error Message: - // "${result.errMsg}" - // Assertion: - //
- // Expected value should be - //
${method}
- //
${preposition} ${expected}
- //
- // Received value: - // ${result.returned} - // Skipping the remaining tests of the function. - //
- // `) - // } + setTestsOutput(prevCards => ([...prevCards, testFailCard1])) + } else { + const preposition = result.assertMethod === 'equal' || result.assertMethod === 'notEqual' ? 'to' : '' + const method = result.assertMethod === 'ok' ? '' : result.assertMethod + const expected = result.assertMethod === 'ok' ? '\'true\'' : result.expected + const testFailCard2: any = (
this.highlightLocation(result.location, runningTests, result.filename)} + > +
+ ✘ {result.value} + {/* ${debugBtn} */} +
+ Error Message: + "{result.errMsg}" + Assertion: +
+ Expected value should be +
{method}
+
{preposition} {expected}
+
+ Received value: + {result.returned} + Skipping the remaining tests of the function. +
) + setTestsOutput(prevCards => ([...prevCards, testFailCard2])) + } } //else if (result.type === 'logOnly') { // if (result.hhLogs && result.hhLogs.length) this.printHHLogs(result.hhLogs, result.value)