Skip to main content

MockDeltaQueue Class

Mock implementation of IDeltaQueue for testing that does nothing

This API is provided for existing users, but is not recommended for new users.

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​

ParameterDescription
T

Constructors​

ConstructorAlertsDescription
(constructor)()BetaConstructs a new instance of the MockDeltaQueue class

Properties​

PropertyAlertsModifiersTypeDescription
disposedBetareadonlyany
idleBetareadonlyboolean
lengthBetareadonlynumber
pauseCountBetanumber
pausedBetareadonlyboolean
processCallbackBeta(el: T) => void
queueBetareadonlyT[]

Methods​

MethodAlertsReturn TypeDescription
dispose()Betavoid
pause()BetaPromise<void>
peek()BetaT | undefined
pop()BetaT | undefined
process()Betavoid
push(el)Betavoid
resume()Betavoid
toArray()BetaT[]
waitTillProcessingDone()BetaPromise<{ count: number; duration: number; }>

Constructor Details​

(constructor)​

Constructs a new instance of the MockDeltaQueue class

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

constructor();

Property Details​

disposed​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

get disposed(): any;

Type: any

idle​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

get idle(): boolean;

Type: boolean

length​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

get length(): number;

Type: number

pauseCount​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

protected pauseCount: number;

Type: number

paused​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

get paused(): boolean;

Type: boolean

processCallback​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

processCallback: (el: T) => void;

Type: (el: T) => void

queue​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

protected readonly queue: T[];

Type: T[]

Method Details​

dispose​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

dispose(): void;

pause​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

pause(): Promise<void>;

Returns​

Return type: Promise<void>

peek​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

peek(): T | undefined;

Returns​

Return type: T | undefined

pop​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

pop(): T | undefined;

Returns​

Return type: T | undefined

process​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

protected process(): void;

push​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

push(el: T): void;

Parameters​

ParameterTypeDescription
elT

resume​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

resume(): void;

toArray​

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

toArray(): T[];

Returns​

Return type: T[]

waitTillProcessingDone​

This API is provided for existing users, but is not recommended for new users.

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; }>