import * as L from "lonna" ; import { unmount , HarmajaOutput , HarmajaStaticOutput } from "../harmaja" ; export function testRender < T > ( init , test ) { const bus = L . bus < T > ( ) ; const testScope = L . createScope ( ) ; testScope . start ( ) ; const property = L . toProperty ( init , testScope ) ( bus ) ; const element = test ( property , bus . push ) ; unmount ( element as HarmajaStaticOutput ) ; testScope . end ( ) ; expect ( ( property as any ) . _dispatcher . hasObservers ( ) ) . toEqual ( false ) ; } export type Property < T > = L . Property < T > ; export type Atom < T > = L . Atom < T > ; export type EventStream < T > = L . EventStream < T > ; export function map < A , B > ( p , fn ) { return L . map ( fn ) ( p ) ; } export const atom = L . atom ; export const constant = L . constant ;