Function: cellHarness()
cellHarness<
T>(setup):CellHarness<T>
Defined in: testing.ts:76
Build a cell graph under a disposable owner and keep it live.
setup runs inside createRoot (cells need an owner), and every Cell found among the returned object's values is watched by a passive effect — without one, a graph is lazy (pull-only) and effects like auto-recompute never fire the way they do under a rendering app. Call dispose() in the test's cleanup; better, register it once:
ts
let h: CellHarness<AppGraph>;
afterEach(() => h?.dispose());Type Parameters
T
T extends object
Parameters
setup
() => T
Returns
CellHarness<T>