1 | import { Observable } from '../Observable';
|
2 | import { ColdObservable } from './ColdObservable';
|
3 | import { HotObservable } from './HotObservable';
|
4 | import { TestMessage } from './TestMessage';
|
5 | import { SubscriptionLog } from './SubscriptionLog';
|
6 | import { VirtualTimeScheduler } from '../scheduler/VirtualTimeScheduler';
|
7 | export interface RunHelpers {
|
8 | cold: typeof TestScheduler.prototype.createColdObservable;
|
9 | hot: typeof TestScheduler.prototype.createHotObservable;
|
10 | flush: typeof TestScheduler.prototype.flush;
|
11 | time: typeof TestScheduler.prototype.createTime;
|
12 | expectObservable: typeof TestScheduler.prototype.expectObservable;
|
13 | expectSubscriptions: typeof TestScheduler.prototype.expectSubscriptions;
|
14 | animate: (marbles: string) => void;
|
15 | }
|
16 | export declare type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void;
|
17 | export declare type subscriptionLogsToBeFn = (marbles: string | string[]) => void;
|
18 | export declare class TestScheduler extends VirtualTimeScheduler {
|
19 | assertDeepEqual: (actual: any, expected: any) => boolean | void;
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | static frameTimeFactor: number;
|
27 | |
28 |
|
29 |
|
30 | readonly hotObservables: HotObservable<any>[];
|
31 | |
32 |
|
33 |
|
34 | readonly coldObservables: ColdObservable<any>[];
|
35 | |
36 |
|
37 |
|
38 | private flushTests;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | private runMode;
|
44 | |
45 |
|
46 |
|
47 |
|
48 | constructor(assertDeepEqual: (actual: any, expected: any) => boolean | void);
|
49 | createTime(marbles: string): number;
|
50 | /**
|
51 | * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided.
|
52 | * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used.
|
53 | * @param error The error to use for the `#` marble (if present).
|
54 | */
|
55 | createColdObservable<T = string>(marbles: string, values?: {
|
56 | [marble: string]: T;
|
57 | }, error?: any): ColdObservable<T>;
|
58 | /**
|
59 | * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided.
|
60 | * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used.
|
61 | * @param error The error to use for the `#` marble (if present).
|
62 | */
|
63 | createHotObservable<T = string>(marbles: string, values?: {
|
64 | [marble: string]: T;
|
65 | }, error?: any): HotObservable<T>;
|
66 | private materializeInnerObservable;
|
67 | expectObservable<T>(observable: Observable<T>, subscriptionMarbles?: string | null): {
|
68 | toBe(marbles: string, values?: any, errorValue?: any): void;
|
69 | toEqual: (other: Observable<T>) => void;
|
70 | };
|
71 | expectSubscriptions(actualSubscriptionLogs: SubscriptionLog[]): {
|
72 | toBe: subscriptionLogsToBeFn;
|
73 | };
|
74 | flush(): void;
|
75 |
|
76 | static parseMarblesAsSubscriptions(marbles: string | null, runMode?: boolean): SubscriptionLog;
|
77 |
|
78 | static parseMarbles(marbles: string, values?: any, errorValue?: any, materializeInnerObservables?: boolean, runMode?: boolean): TestMessage[];
|
79 | private createAnimator;
|
80 | private createDelegates;
|
81 | |
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 | run<T>(callback: (helpers: RunHelpers) => T): T;
|
90 | }
|
91 | //# sourceMappingURL=TestScheduler.d.ts.map |
\ | No newline at end of file |