vitest-marbles
Version:
Marble testing helpers library for RxJs and Jest
21 lines (20 loc) • 937 B
TypeScript
import { ColdObservable } from './src/rxjs/cold-observable';
import { HotObservable } from './src/rxjs/hot-observable';
export declare type ObservableWithSubscriptions = ColdObservable | HotObservable;
interface VitestMarblesMatchers {
toBeObservable(observable: ObservableWithSubscriptions): void;
toHaveSubscriptions(marbles: string | string[]): void;
toHaveNoSubscriptions(): void;
toBeMarble(marble: string): void;
toSatisfyOnFlush(func: () => void): void;
}
declare module 'vitest' {
interface Assertion extends VitestMarblesMatchers {
}
interface AsymmetricMatchersContaining extends VitestMarblesMatchers {
}
}
export { Scheduler } from './src/rxjs/scheduler';
export declare function hot(marbles: string, values?: any, error?: any): HotObservable;
export declare function cold(marbles: string, values?: any, error?: any): ColdObservable;
export declare function time(marbles: string): number;