MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / readRenderedText

Function readRenderedText

packages/node/src/__tests__/hotStateReload.test.ts:154–160  ·  view source on GitHub ↗
(viewFn: ViewFn<State>)

Source from the content-addressed store, hash-verified

152}
153
154function readRenderedText(viewFn: ViewFn<State>): string {
155 const vnode = viewFn({ count: 7 });
156 if (vnode.kind !== "text") {
157 throw new Error(`expected text vnode, got ${String(vnode.kind)}`);
158 }
159 return vnode.text;
160}
161
162function readRouteLabel(routes: readonly RouteDefinition<State>[]): string {
163 const first = routes[0];

Callers 1

Calls 1

viewFnFunction · 0.50

Tested by

no test coverage detected