test(chat): type the catch-all renderSlot overrides that skip the aside

This commit is contained in:
LegGasai committed 2026-11-06 18:57:14 +08:00
1 parent 3500261d0d
commit f28bb787a5
1 file changed
+2 -2
@@ -742,7 +742,7 @@ describe('Chat node rendering', () => {
const { getTriggerProps } = useMarkdownDelegate()
return <>{targets.map((target, index) => <button key={index} {...getTriggerProps!(target)}>{index}</button>)}</>
}
const view = render(<ChatView {...h.props} renderSlot={key => key === 'conversation.chat.aside' ? null : <References />} />)
const view = render(<ChatView {...h.props} renderSlot={(key: string) => key === 'conversation.chat.aside' ? null : <References />} />)
directory = '/workspace/moved'
for (const [index, target] of targets.entries()) {
const button = view.getByRole('button', { name: String(index) })
@@ -4827,7 +4827,7 @@ it('formats Portuguese elapsed minutes with numeric units', () => {
it('does not infer menu targets from links or data attributes inside a plugin flow slot', () => {
const h = makeHarness()
const custom = vi.fn()
const view = render(<ChatView {...h.props} renderSlot={key => key === 'conversation.chat.aside' ? null : <>
const view = render(<ChatView {...h.props} renderSlot={(key: string) => key === 'conversation.chat.aside' ? null : <>
<a href="https://example.com/plugin">Plugin link</a>
<button data-file-path="/plugin/private.txt">Undeclared file</button>
<button onContextMenu={(event) => {