* Mount a component and let its data effects settle. * * Every screen fetches inside an `$effect`, so a render is not finished until * the promise the adapter returned has resolved and the follow-up render has * flushed. Two macrotask turns cover the deepest chain any of them has (the * Symbol
( // eslint-disable-next-line @typescript-eslint/no-explicit-any component: any, props: Record<string, unknown> )
| 490 | * Symbol view: node, then its source). |
| 491 | */ |
| 492 | async function render( |
| 493 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 494 | component: any, |
| 495 | props: Record<string, unknown> |
| 496 | ): Promise<void> { |
| 497 | mounted = mount(component, { target: host, props }) as Record<string, unknown>; |
| 498 | for (let turn = 0; turn < 4; turn += 1) { |
| 499 | await new Promise((resolve) => setTimeout(resolve, 0)); |
| 500 | flushSync(); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | describe('@colbymchenry/codegraph-ui — a host renders the package', () => { |
| 505 | it('SymbolView draws callers, source and the callee rail from a mock adapter', async () => { |
no test coverage detected