mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-17 15:10:22 +03:00
Prepend, not append, test results
This commit is contained in:
parent
538c97b918
commit
cd35d9ae5b
@ -26,12 +26,17 @@ class Reporter {
|
||||
console.log('start');
|
||||
})
|
||||
.on(EVENT_SUITE_BEGIN, evt => {
|
||||
const header = document.createElement(`h${divs.length + 1}`)
|
||||
if(evt.root) return;
|
||||
const level = divs.length + 1;
|
||||
const header = document.createElement(`h${level}`)
|
||||
header.innerText = evt.title
|
||||
testDiv.appendChild(header)
|
||||
const div = document.createElement('div')
|
||||
div.appendChild(header)
|
||||
if(level === 1) {
|
||||
div.dataset['file'] = evt.file
|
||||
}
|
||||
divs.push(div)
|
||||
testDiv.appendChild(div)
|
||||
testDiv.prepend(div)
|
||||
})
|
||||
.on(EVENT_SUITE_END, (a) => {
|
||||
divs.pop()
|
||||
|
Loading…
Reference in New Issue
Block a user