MockStorage Class
Mock implementation of IChannelStorageService based on ITree input.
Signature
export declare class MockStorage implements IChannelStorageService
Implements: IChannelStorageService
Constructors
| Constructor | Description |
|---|---|
| (constructor)(tree) | Constructs a new instance of the MockStorage class |
Static Methods
| Method | Return Type | Description |
|---|---|---|
| createFromSummary(summaryTree) | MockStorage |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| tree | optional |
ITree | undefined |
Methods
| Method | Return Type | Description |
|---|---|---|
| contains(path) | Promise<boolean> | |
| list(path) | Promise<string[]> | |
| readBlob(path) | Promise<ArrayBufferLike> |
Constructor Details
(constructor)
Constructs a new instance of the MockStorage class
Signature
constructor(tree?: ITree | undefined);
Parameters
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| tree | optional | ITree | undefined |
Property Details
tree
Signature
protected tree?: ITree | undefined;
Type: ITree | undefined
Method Details
contains
Signature
contains(path: string): Promise<boolean>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| path | string |
Returns
Return type: Promise<boolean>
createFromSummary
Signature
static createFromSummary(summaryTree: ISummaryTree): MockStorage;
Parameters
| Parameter | Type | Description |
|---|---|---|
| summaryTree | ISummaryTree |
Returns
Return type: MockStorage
list
Signature
list(path: string): Promise<string[]>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| path | string |
Returns
Return type: Promise<string[]>
readBlob
Signature
readBlob(path: string): Promise<ArrayBufferLike>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| path | string |
Returns
Return type: Promise<ArrayBufferLike>