|
|
|
@ -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 = ( |
|
|
|
|