MockDeltaQueue Class
Mock implementation of IDeltaQueue for testing that does nothing \
To use, import via @fluidframework/test-runtime-utils/legacy.
For more information about our API support guarantees, see here.
Signature
export declare class MockDeltaQueue<T> extends EventEmitter implements IDeltaQueue<T>
Extends: EventEmitter
Implements: IDeltaQueue<T>
Type Parameters
| Parameter | Description |
|---|---|
| T |
Constructors
| Constructor | Alerts | Description |
|---|---|---|
| (constructor)() | Beta |
Constructs a new instance of the MockDeltaQueue class |
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| disposed | Beta |
readonly |
any | |
| idle | Beta |
readonly |
boolean | |
| length | Beta |
readonly |
number | |
| pauseCount | Beta |
number | ||
| paused | Beta |
readonly |
boolean | |
| processCallback | Beta |
(el: T) => void | ||
| queue | Beta |
readonly |
T[] |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| dispose() | Beta |
void | |
| pause() | Beta |
Promise<void> | |
| peek() | Beta |
T | undefined | |
| pop() | Beta |
T | undefined | |
| process() | Beta |
void | |
| push(el) | Beta |
void | |
| resume() | Beta |
void | |
| toArray() | Beta |
T[] | |
| waitTillProcessingDone() | Beta |
Promise<{ count: number; duration: number; }> |
Constructor Details
(constructor)
Constructs a new instance of the MockDeltaQueue class
For more information about our API support guarantees, see here.
Signature
constructor();
Property Details
disposed
For more information about our API support guarantees, see here.
Signature
get disposed(): any;
Type: any
idle
For more information about our API support guarantees, see here.
Signature
get idle(): boolean;
Type: boolean
length
For more information about our API support guarantees, see here.
Signature
get length(): number;
Type: number
pauseCount
For more information about our API support guarantees, see here.
Signature
protected pauseCount: number;
Type: number
paused
For more information about our API support guarantees, see here.
Signature
get paused(): boolean;
Type: boolean
processCallback
For more information about our API support guarantees, see here.
Signature
processCallback: (el: T) => void;
Type: (el: T) => void
queue
For more information about our API support guarantees, see here.
Signature
protected readonly queue: T[];
Type: T[]
Method Details
dispose
For more information about our API support guarantees, see here.
Signature
dispose(): void;
pause
For more information about our API support guarantees, see here.
Signature
pause(): Promise<void>;
Returns
Return type: Promise<void>
peek
For more information about our API support guarantees, see here.
Signature
peek(): T | undefined;
Returns
Return type: T | undefined
pop
For more information about our API support guarantees, see here.
Signature
pop(): T | undefined;
Returns
Return type: T | undefined
process
For more information about our API support guarantees, see here.
Signature
protected process(): void;
push
For more information about our API support guarantees, see here.
Signature
push(el: T): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| el | T |
resume
For more information about our API support guarantees, see here.
Signature
resume(): void;
toArray
For more information about our API support guarantees, see here.
Signature
toArray(): T[];
Returns
Return type: T[]
waitTillProcessingDone
For more information about our API support guarantees, see here.
Signature
waitTillProcessingDone(): Promise<{
count: number;
duration: number;
}>;
Returns
Return type: Promise<{ count: number; duration: number; }>