(vnode: VNode)
| 15 | import type { CollectedTrap, CollectedZone } from "../widgetMeta.js"; |
| 16 | |
| 17 | function commitTree(vnode: VNode) { |
| 18 | const allocator = createInstanceIdAllocator(1); |
| 19 | const res = commitVNodeTree(null, vnode, { allocator }); |
| 20 | if (!res.ok) { |
| 21 | assert.fail(`commit failed: ${res.fatal.code}: ${res.fatal.detail}`); |
| 22 | } |
| 23 | return res.value.root; |
| 24 | } |
| 25 | |
| 26 | function keyEvent(key: number, mods = 0) { |
| 27 | return { kind: "key" as const, action: "down" as const, key, mods, timeMs: 0 }; |
no test coverage detected