mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-10-26 19:24:31 +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');
|
console.log('start');
|
||||||
})
|
})
|
||||||
.on(EVENT_SUITE_BEGIN, evt => {
|
.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
|
header.innerText = evt.title
|
||||||
testDiv.appendChild(header)
|
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
|
div.appendChild(header)
|
||||||
|
if(level === 1) {
|
||||||
|
div.dataset['file'] = evt.file
|
||||||
|
}
|
||||||
divs.push(div)
|
divs.push(div)
|
||||||
testDiv.appendChild(div)
|
testDiv.prepend(div)
|
||||||
})
|
})
|
||||||
.on(EVENT_SUITE_END, (a) => {
|
.on(EVENT_SUITE_END, (a) => {
|
||||||
divs.pop()
|
divs.pop()
|
||||||
|
Loading…
Reference in New Issue
Block a user