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

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

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

Parameter Type Description
el T

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