(id, children, depth)
| 40 | }); |
| 41 | |
| 42 | function createSubtree(id, children, depth) { |
| 43 | const el = doc.createElement('div'); |
| 44 | el.id = id; |
| 45 | el.textContent = id; |
| 46 | if (depth > 1) { |
| 47 | for (let i = 0; i < children; i++) { |
| 48 | const child = createSubtree(`${id}-${i + 1}`, children, depth - 1); |
| 49 | el.appendChild(child); |
| 50 | } |
| 51 | } |
| 52 | return el; |
| 53 | } |
| 54 | |
| 55 | function el(id) { |
| 56 | if (id == 'T') { |
no outgoing calls
no test coverage detected