MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / render

Function render

__tests__/ui-package.test.ts:492–502  ·  view source on GitHub ↗

* 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>
)

Source from the content-addressed store, hash-verified

490 * Symbol view: node, then its source).
491 */
492async 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
504describe('@colbymchenry/codegraph-ui — a host renders the package', () => {
505 it('SymbolView draws callers, source and the callee rail from a mock adapter', async () => {

Callers 1

ui-package.test.tsFile · 0.70

Calls 1

mountFunction · 0.50

Tested by

no test coverage detected