import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' import React from 'react' import { renderToStaticMarkup } from 'react-dom/server' import { EscalationPanel } from './EscalationPanel' const markup = renderToStaticMarkup( React.createElement(EscalationPanel, { meta: { checkpoint_type: 'company_work_item_gate', checkpoint_id: 'cp-gate', prompt: 'Gate Review\n\n- Confirm the artifact exists\n- Confirm tests passed\n\n```json\n{"ok": true}\n```', summary: 'Review the gate evidence.', options: [ { id: 'approve', label: 'Approve' }, { id: 'deny', label: 'Deny' }, ], active_subagents: [{ id: 'sub-1' }], worktree_path: '/tmp/work', }, onReply: () => undefined, responded: false, }), ) assert.match(markup, /Gate Review/) assert.match(markup, /
/)
assert.match(markup, /Runtime State<\/summary>/)
assert.equal((markup.match(/