renderTests

pull/1862/head
Aniket-Engg 3 years ago committed by Aniket
parent 51d8cfe528
commit 94a898c53c
  1. 26
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx

@ -230,17 +230,7 @@ export const SolidityUnitTesting = (props: any) => {
}
}
const showTestsResult = () => {
console.log('filesContent---->', filesContent)
let filenames = Object.keys(testsResultByFilename)
for(const filename of filenames) {
const fileTestsResult = testsResultByFilename[filename]
const contracts = Object.keys(fileTestsResult)
for(const contract of contracts) {
if(contract && contract !== 'summary') {
runningTestFileName = cleanFileName(filename, contract)
const tests = fileTestsResult[contract]
if (tests?.length) {
const renderTests = (tests: any, contract: any, filename: any) => {
const index = tests.findIndex((test: any) => test.type === 'testFailure')
let label
if (index > -1) label = (<div
@ -345,6 +335,20 @@ export const SolidityUnitTesting = (props: any) => {
}
}
}
}
const showTestsResult = () => {
console.log('filesContent---->', filesContent)
let filenames = Object.keys(testsResultByFilename)
for(const filename of filenames) {
const fileTestsResult = testsResultByFilename[filename]
const contracts = Object.keys(fileTestsResult)
for(const contract of contracts) {
if(contract && contract !== 'summary') {
runningTestFileName = cleanFileName(filename, contract)
const tests = fileTestsResult[contract]
if (tests?.length) {
renderTests(tests, contract, filename)
} else {
// show only contract and file name
const contractCard: any = (

Loading…
Cancel
Save