(title, result)
| 12 | document.body.appendChild(style); |
| 13 | |
| 14 | function addTest(title, result) { |
| 15 | // join() result if it's array-like |
| 16 | if (result instanceof Uint8Array || Array.isArray(result)) { |
| 17 | result = Array.prototype.join.apply(result); |
| 18 | } |
| 19 | |
| 20 | let el; |
| 21 | if (result === undefined) { |
| 22 | el = document.createElement('h2'); |
| 23 | el.innerHTML = title; |
| 24 | } else { |
| 25 | el = document.createElement('div'); |
| 26 | el.className = 'test_result'; |
| 27 | el.innerHTML = `<dt>${title}</dt>: <dd>${result}</dd>`; |
| 28 | } |
| 29 | |
| 30 | document.body.appendChild(el); |
| 31 | } |
| 32 | |
| 33 | function done() { |
| 34 | const div = document.createElement('h2'); |
no outgoing calls
no test coverage detected