Commit 0f7d009d authored by ioedeveloper's avatar ioedeveloper Committed by Liana Husikyan

Add test names to error messages for multiple test contracts in single file

parent 6593d76d
......@@ -254,14 +254,26 @@ module.exports = class TestTab extends ViewPlugin {
const isFailingLabel = document.querySelector(`.failed_${this.runningTestFileName}`)
if (!isFailingLabel) this.setHeader(false)
displayError.appendChild(yo`
if (result.errors.length > 1) {
displayError.appendChild(yo`
<div>
${error.context}
<ul class="ml-3 mb-0">
<li>${error.value} </li>
</ul>
<span class="ml-3">${error.message}</span>
</div>
`)
} else {
displayError.appendChild(yo`
<div>
<ul class="ml-3 mb-0">
<li>${error.value} </li>
</ul>
<span class="ml-3">${error.message}</span>
</div>
`)
}
})
if (result.errors && result.errors.length > 0) {
this.testsOutput.appendChild(displayError)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment