MockStorage Class
Mock implementation of IChannelStorageService based on ITree input. \
To use, import via @fluidframework/test-runtime-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare class MockStorage implements IChannelStorageService
Implements: IChannelStorageService
Constructors
Constructor | Alerts | Description |
---|---|---|
(constructor)(tree) | Beta |
Constructs a new instance of the MockStorage class |
Static Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
createFromSummary(summaryTree) | Beta |
MockStorage |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
tree | Beta |
optional |
ITree | undefined |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
contains(path) | Beta |
Promise<boolean> | |
getSnapshotTree() | Beta |
ISnapshotTree | undefined | |
list(path) | Beta |
Promise<string[]> | |
readBlob(path) | Beta |
Promise<ArrayBufferLike> |
Constructor Details
(constructor)
Constructs a new instance of the MockStorage
class
For more information about our API support guarantees, see here.
Signature
constructor(tree?: ITree | undefined);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
tree | optional | ITree | undefined |
Property Details
tree
For more information about our API support guarantees, see here.
Signature
protected tree?: ITree | undefined;
Type: ITree | undefined
Method Details
contains
For more information about our API support guarantees, see here.
Signature
contains(path: string): Promise<boolean>;
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
Returns
Return type: Promise<boolean>
createFromSummary
For more information about our API support guarantees, see here.
Signature
static createFromSummary(summaryTree: ISummaryTree): MockStorage;
Parameters
Parameter | Type | Description |
---|---|---|
summaryTree | ISummaryTree |
Returns
Return type: MockStorage
getSnapshotTree
For more information about our API support guarantees, see here.
Signature
getSnapshotTree(): ISnapshotTree | undefined;
Returns
Return type: ISnapshotTree | undefined
list
For more information about our API support guarantees, see here.
Signature
list(path: string): Promise<string[]>;
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
Returns
Return type: Promise<string[]>
readBlob
For more information about our API support guarantees, see here.
Signature
readBlob(path: string): Promise<ArrayBufferLike>;
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
Returns
Return type: Promise<ArrayBufferLike>