Skip to main content
Version: v1

MockObjectStorageService Class

Mock implementation of IChannelStorageService

Signature​

export declare class MockObjectStorageService implements IChannelStorageService

Implements: IChannelStorageService

Constructors​

ConstructorDescription
(constructor)(contents)Constructs a new instance of the MockObjectStorageService class

Methods​

MethodReturn TypeDescription
contains(path)Promise<boolean>
list(path)Promise<string[]>
readBlob(path)Promise<ArrayBufferLike>

Constructor Details​

(constructor)​

Constructs a new instance of the MockObjectStorageService class

Signature​

constructor(contents: {
[key: string]: string;
});

Parameters​

ParameterTypeDescription
contents{ [key: string]: string; }

Method Details​

contains​

Signature​

contains(path: string): Promise<boolean>;

Parameters​

ParameterTypeDescription
pathstring

Returns​

Return type: Promise<boolean>

list​

Signature​

list(path: string): Promise<string[]>;

Parameters​

ParameterTypeDescription
pathstring

Returns​

Return type: Promise<string[]>

readBlob​

Signature​

readBlob(path: string): Promise<ArrayBufferLike>;

Parameters​

ParameterTypeDescription
pathstring

Returns​

Return type: Promise<ArrayBufferLike>