@fluidframework/test-utils 2.0.0-dev.2.3.0.115467 → 2.0.0-dev.4.1.0.148229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +8 -10
- package/README.md +41 -11
- package/api-extractor.json +2 -2
- package/dist/DriverWrappers.d.ts.map +1 -1
- package/dist/DriverWrappers.js.map +1 -1
- package/dist/TestConfigs.d.ts.map +1 -1
- package/dist/TestConfigs.js +3 -4
- package/dist/TestConfigs.js.map +1 -1
- package/dist/TestSummaryUtils.d.ts +20 -4
- package/dist/TestSummaryUtils.d.ts.map +1 -1
- package/dist/TestSummaryUtils.js +41 -33
- package/dist/TestSummaryUtils.js.map +1 -1
- package/dist/containerUtils.d.ts +29 -0
- package/dist/containerUtils.d.ts.map +1 -0
- package/dist/containerUtils.js +45 -0
- package/dist/containerUtils.js.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/loaderContainerTracker.d.ts +3 -9
- package/dist/loaderContainerTracker.d.ts.map +1 -1
- package/dist/loaderContainerTracker.js +45 -47
- package/dist/loaderContainerTracker.js.map +1 -1
- package/dist/localCodeLoader.d.ts.map +1 -1
- package/dist/localCodeLoader.js.map +1 -1
- package/dist/localLoader.d.ts.map +1 -1
- package/dist/localLoader.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js.map +1 -1
- package/dist/testContainerRuntimeFactory.d.ts +2 -2
- package/dist/testContainerRuntimeFactory.d.ts.map +1 -1
- package/dist/testContainerRuntimeFactory.js +3 -3
- package/dist/testContainerRuntimeFactory.js.map +1 -1
- package/dist/testFluidObject.d.ts.map +1 -1
- package/dist/testFluidObject.js +7 -3
- package/dist/testFluidObject.js.map +1 -1
- package/dist/testObjectProvider.d.ts +6 -1
- package/dist/testObjectProvider.d.ts.map +1 -1
- package/dist/testObjectProvider.js +49 -16
- package/dist/testObjectProvider.js.map +1 -1
- package/dist/timeoutUtils.d.ts +11 -2
- package/dist/timeoutUtils.d.ts.map +1 -1
- package/dist/timeoutUtils.js +122 -18
- package/dist/timeoutUtils.js.map +1 -1
- package/package.json +65 -58
- package/prettier.config.cjs +1 -1
- package/src/DriverWrappers.ts +40 -37
- package/src/TestConfigs.ts +7 -7
- package/src/TestSummaryUtils.ts +123 -124
- package/src/containerUtils.ts +48 -0
- package/src/index.ts +24 -23
- package/src/interfaces.ts +10 -7
- package/src/loaderContainerTracker.ts +618 -577
- package/src/localCodeLoader.ts +85 -77
- package/src/localLoader.ts +24 -24
- package/src/packageVersion.ts +1 -1
- package/src/retry.ts +31 -25
- package/src/testContainerRuntimeFactory.ts +59 -56
- package/src/testFluidObject.ts +168 -152
- package/src/testObjectProvider.ts +477 -384
- package/src/timeoutUtils.ts +191 -41
- package/tsconfig.json +9 -12
package/src/TestSummaryUtils.ts
CHANGED
|
@@ -6,158 +6,157 @@
|
|
|
6
6
|
import { ContainerRuntimeFactoryWithDefaultDataStore } from "@fluidframework/aqueduct";
|
|
7
7
|
import { assert } from "@fluidframework/common-utils";
|
|
8
8
|
import { IContainer, IHostLoader, LoaderHeader } from "@fluidframework/container-definitions";
|
|
9
|
-
import { ConnectionState } from "@fluidframework/container-loader";
|
|
10
9
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
IGCRuntimeOptions,
|
|
11
|
+
ISummarizer,
|
|
12
|
+
ISummaryRuntimeOptions,
|
|
14
13
|
} from "@fluidframework/container-runtime";
|
|
15
14
|
import { FluidObject, IRequest } from "@fluidframework/core-interfaces";
|
|
16
15
|
import { DriverHeader } from "@fluidframework/driver-definitions";
|
|
17
16
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
IContainerRuntimeBase,
|
|
18
|
+
IFluidDataStoreFactory,
|
|
19
|
+
NamedFluidDataStoreRegistryEntries,
|
|
21
20
|
} from "@fluidframework/runtime-definitions";
|
|
22
21
|
import { requestFluidObject } from "@fluidframework/runtime-utils";
|
|
23
22
|
import { IConfigProviderBase } from "@fluidframework/telemetry-utils";
|
|
23
|
+
import { ITelemetryBaseLogger } from "@fluidframework/common-definitions";
|
|
24
24
|
import { ITestContainerConfig, ITestObjectProvider } from "./testObjectProvider";
|
|
25
25
|
import { mockConfigProvider } from "./TestConfigs";
|
|
26
|
+
import { waitForContainerConnection } from "./containerUtils";
|
|
27
|
+
import { timeoutAwait } from "./timeoutUtils";
|
|
26
28
|
|
|
27
29
|
const summarizerClientType = "summarizer";
|
|
28
30
|
|
|
29
|
-
async function createSummarizerCore(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
31
|
+
async function createSummarizerCore(
|
|
32
|
+
container: IContainer,
|
|
33
|
+
loader: IHostLoader,
|
|
34
|
+
summaryVersion?: string,
|
|
35
|
+
) {
|
|
36
|
+
const absoluteUrl = await container.getAbsoluteUrl("");
|
|
37
|
+
if (absoluteUrl === undefined) {
|
|
38
|
+
throw new Error("URL could not be resolved");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const request: IRequest = {
|
|
42
|
+
headers: {
|
|
43
|
+
[LoaderHeader.cache]: false,
|
|
44
|
+
[LoaderHeader.clientDetails]: {
|
|
45
|
+
capabilities: { interactive: false },
|
|
46
|
+
type: summarizerClientType,
|
|
47
|
+
},
|
|
48
|
+
[DriverHeader.summarizingClient]: true,
|
|
49
|
+
[LoaderHeader.version]: summaryVersion,
|
|
50
|
+
},
|
|
51
|
+
url: absoluteUrl,
|
|
52
|
+
};
|
|
53
|
+
const summarizerContainer = await loader.resolve(request);
|
|
54
|
+
await waitForContainerConnection(summarizerContainer);
|
|
55
|
+
|
|
56
|
+
const fluidObject: FluidObject<ISummarizer> | undefined = summarizerContainer.getEntryPoint
|
|
57
|
+
? await summarizerContainer.getEntryPoint?.()
|
|
58
|
+
: await requestFluidObject<FluidObject<ISummarizer>>(summarizerContainer, {
|
|
59
|
+
url: "_summarizer",
|
|
60
|
+
});
|
|
61
|
+
if (fluidObject?.ISummarizer === undefined) {
|
|
62
|
+
throw new Error("Fluid object does not implement ISummarizer");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
container: summarizerContainer,
|
|
67
|
+
summarizer: fluidObject.ISummarizer,
|
|
68
|
+
};
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
const defaultSummaryOptions: ISummaryRuntimeOptions = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
72
|
+
summaryConfigOverrides: {
|
|
73
|
+
state: "disableHeuristics",
|
|
74
|
+
maxAckWaitTime: 10000,
|
|
75
|
+
maxOpsSinceLastSummary: 7000,
|
|
76
|
+
initialSummarizerDelayMs: 0,
|
|
77
|
+
},
|
|
70
78
|
};
|
|
71
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Creates a summarizer client from the given container and data store factory, and returns the summarizer client's
|
|
82
|
+
* IContainer and ISummarizer.
|
|
83
|
+
* The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.
|
|
84
|
+
*/
|
|
72
85
|
export async function createSummarizerFromFactory(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
);
|
|
97
|
-
const absoluteUrl = await container.getAbsoluteUrl("");
|
|
98
|
-
return (await createSummarizerCore(absoluteUrl, loader, summaryVersion)).summarizer;
|
|
86
|
+
provider: ITestObjectProvider,
|
|
87
|
+
container: IContainer,
|
|
88
|
+
dataStoreFactory: IFluidDataStoreFactory,
|
|
89
|
+
summaryVersion?: string,
|
|
90
|
+
containerRuntimeFactoryType = ContainerRuntimeFactoryWithDefaultDataStore,
|
|
91
|
+
registryEntries?: NamedFluidDataStoreRegistryEntries,
|
|
92
|
+
logger?: ITelemetryBaseLogger,
|
|
93
|
+
): Promise<{ container: IContainer; summarizer: ISummarizer }> {
|
|
94
|
+
const innerRequestHandler = async (request: IRequest, runtime: IContainerRuntimeBase) =>
|
|
95
|
+
runtime.IFluidHandleContext.resolveHandle(request);
|
|
96
|
+
const runtimeFactory = new containerRuntimeFactoryType(
|
|
97
|
+
dataStoreFactory,
|
|
98
|
+
registryEntries ?? [[dataStoreFactory.type, Promise.resolve(dataStoreFactory)]],
|
|
99
|
+
undefined,
|
|
100
|
+
[innerRequestHandler],
|
|
101
|
+
{ summaryOptions: defaultSummaryOptions },
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const loader = provider.createLoader([[provider.defaultCodeDetails, runtimeFactory]], {
|
|
105
|
+
configProvider: mockConfigProvider(),
|
|
106
|
+
logger,
|
|
107
|
+
});
|
|
108
|
+
return createSummarizerCore(container, loader, summaryVersion);
|
|
99
109
|
}
|
|
100
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Creates a summarizer client from the given container and returns the summarizer client's IContainer and ISummarizer.
|
|
113
|
+
* The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.
|
|
114
|
+
*/
|
|
101
115
|
export async function createSummarizer(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
export async function createSummarizerWithContainer(
|
|
119
|
-
provider: ITestObjectProvider,
|
|
120
|
-
absoluteUrl: string | undefined,
|
|
121
|
-
summaryVersion?: string,
|
|
122
|
-
gcOptions?: IGCRuntimeOptions,
|
|
123
|
-
configProvider: IConfigProviderBase = mockConfigProvider(),
|
|
124
|
-
): Promise<{ container: IContainer; summarizer: ISummarizer; }> {
|
|
125
|
-
const testContainerConfig: ITestContainerConfig = {
|
|
126
|
-
runtimeOptions: {
|
|
127
|
-
summaryOptions: defaultSummaryOptions,
|
|
128
|
-
gcOptions,
|
|
129
|
-
},
|
|
130
|
-
loaderProps: { configProvider },
|
|
131
|
-
};
|
|
132
|
-
const loader = provider.makeTestLoader(testContainerConfig);
|
|
133
|
-
return createSummarizerCore(absoluteUrl, loader, summaryVersion);
|
|
116
|
+
provider: ITestObjectProvider,
|
|
117
|
+
container: IContainer,
|
|
118
|
+
summaryVersion?: string,
|
|
119
|
+
gcOptions?: IGCRuntimeOptions,
|
|
120
|
+
configProvider: IConfigProviderBase = mockConfigProvider(),
|
|
121
|
+
logger?: ITelemetryBaseLogger,
|
|
122
|
+
): Promise<{ container: IContainer; summarizer: ISummarizer }> {
|
|
123
|
+
const testContainerConfig: ITestContainerConfig = {
|
|
124
|
+
runtimeOptions: {
|
|
125
|
+
summaryOptions: defaultSummaryOptions,
|
|
126
|
+
gcOptions,
|
|
127
|
+
},
|
|
128
|
+
loaderProps: { configProvider, logger },
|
|
129
|
+
};
|
|
130
|
+
const loader = provider.makeTestLoader(testContainerConfig);
|
|
131
|
+
return createSummarizerCore(container, loader, summaryVersion);
|
|
134
132
|
}
|
|
135
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Summarizes on demand and returns the summary tree, the version number and the reference sequence number of the
|
|
136
|
+
* submitted summary.
|
|
137
|
+
*/
|
|
136
138
|
export async function summarizeNow(summarizer: ISummarizer, reason: string = "end-to-end test") {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const submitResult = await result.summarySubmitted;
|
|
140
|
-
assert(submitResult.success, "on-demand summary should submit");
|
|
141
|
-
assert(submitResult.data.stage === "submit",
|
|
142
|
-
"on-demand summary submitted data stage should be submit");
|
|
143
|
-
assert(submitResult.data.summaryTree !== undefined, "summary tree should exist");
|
|
139
|
+
const result = summarizer.summarizeOnDemand({ reason });
|
|
144
140
|
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
const submitResult = await timeoutAwait(result.summarySubmitted);
|
|
142
|
+
assert(submitResult.success, "on-demand summary should submit");
|
|
143
|
+
assert(
|
|
144
|
+
submitResult.data.stage === "submit",
|
|
145
|
+
"on-demand summary submitted data stage should be submit",
|
|
146
|
+
);
|
|
147
|
+
assert(submitResult.data.summaryTree !== undefined, "summary tree should exist");
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
const broadcastResult = await timeoutAwait(result.summaryOpBroadcasted);
|
|
150
|
+
assert(broadcastResult.success, "summary op should be broadcast");
|
|
150
151
|
|
|
151
|
-
|
|
152
|
+
const ackNackResult = await timeoutAwait(result.receivedSummaryAckOrNack);
|
|
153
|
+
assert(ackNackResult.success, "summary op should be acked");
|
|
152
154
|
|
|
153
|
-
|
|
154
|
-
summaryTree: submitResult.data.summaryTree,
|
|
155
|
-
summaryVersion: ackNackResult.data.summaryAckOp.contents.handle,
|
|
156
|
-
};
|
|
157
|
-
}
|
|
155
|
+
await new Promise((resolve) => process.nextTick(resolve));
|
|
158
156
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
return {
|
|
158
|
+
summaryTree: submitResult.data.summaryTree,
|
|
159
|
+
summaryVersion: ackNackResult.data.summaryAckOp.contents.handle,
|
|
160
|
+
summaryRefSeq: submitResult.data.referenceSequenceNumber,
|
|
161
|
+
};
|
|
163
162
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { IContainer } from "@fluidframework/container-definitions";
|
|
7
|
+
import { ConnectionState } from "@fluidframework/container-loader";
|
|
8
|
+
import { PromiseExecutor, timeoutPromise, TimeoutWithError } from "./timeoutUtils";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Utility function to wait for the specified Container to be in Connected state.
|
|
12
|
+
* If the Container is already connected, the Promise returns immediately; otherwise it resolves when the Container emits
|
|
13
|
+
* its 'connected' event.
|
|
14
|
+
* If failOnContainerClose === true, the returned Promise will be rejected if the container emits a 'closed' event
|
|
15
|
+
* before a 'connected' event.
|
|
16
|
+
* @param container - The container to wait for.
|
|
17
|
+
* @param failOnContainerClose - If true, the returned Promise will be rejected if the container emits a 'closed' event
|
|
18
|
+
* before a 'connected' event.
|
|
19
|
+
* Defaults to true.
|
|
20
|
+
* @param timeoutOptions - Options related to the behavior of the timeout.
|
|
21
|
+
* If provided, the returned Promise will reject if the container hasn't emitted relevant events in timeoutOptions.durationMs.
|
|
22
|
+
* If not provided, the Promise will wait indefinitely for the Container to emit its 'connected' (or 'closed', if
|
|
23
|
+
* failOnContainerClose === true) event.
|
|
24
|
+
*
|
|
25
|
+
* @returns A Promise that either:
|
|
26
|
+
* - Resolves when the specified container emits a 'connected' event (or immediately if the Container is already connected).
|
|
27
|
+
* - Rejects if failOnContainerClose === true and the container emits a 'closed' event before a 'connected' event.
|
|
28
|
+
* - Rejects after timeoutOptions.durationMs if timeoutOptions !== undefined and the container does not emit relevant
|
|
29
|
+
* events, within that timeframe.
|
|
30
|
+
*/
|
|
31
|
+
export async function waitForContainerConnection(
|
|
32
|
+
container: IContainer,
|
|
33
|
+
failOnContainerClose: boolean = true,
|
|
34
|
+
timeoutOptions?: TimeoutWithError,
|
|
35
|
+
): Promise<void> {
|
|
36
|
+
if (container.connectionState !== ConnectionState.Connected) {
|
|
37
|
+
const executor: PromiseExecutor = (resolve, reject) => {
|
|
38
|
+
container.once("connected", () => resolve());
|
|
39
|
+
if (failOnContainerClose) {
|
|
40
|
+
container.once("closed", (error) => reject(error));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return timeoutOptions === undefined
|
|
45
|
+
? new Promise(executor)
|
|
46
|
+
: timeoutPromise(executor, timeoutOptions);
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -3,37 +3,38 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export {
|
|
6
|
+
export {
|
|
7
|
+
wrapDocumentService,
|
|
8
|
+
wrapDocumentServiceFactory,
|
|
9
|
+
wrapDocumentStorageService,
|
|
10
|
+
} from "./DriverWrappers";
|
|
7
11
|
export { IProvideTestFluidObject, ITestFluidObject } from "./interfaces";
|
|
8
12
|
export { LoaderContainerTracker } from "./loaderContainerTracker";
|
|
9
13
|
export { fluidEntryPoint, LocalCodeLoader, SupportedExportInterfaces } from "./localCodeLoader";
|
|
10
14
|
export { createAndAttachContainer, createLoader } from "./localLoader";
|
|
11
15
|
export { retryWithEventualValue } from "./retry";
|
|
12
16
|
export { mockConfigProvider } from "./TestConfigs";
|
|
13
|
-
export {
|
|
17
|
+
export {
|
|
18
|
+
createTestContainerRuntimeFactory,
|
|
19
|
+
TestContainerRuntimeFactory,
|
|
20
|
+
} from "./testContainerRuntimeFactory";
|
|
14
21
|
export { ChannelFactoryRegistry, TestFluidObject, TestFluidObjectFactory } from "./testFluidObject";
|
|
15
22
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
createDocumentId,
|
|
24
|
+
DataObjectFactoryType,
|
|
25
|
+
EventAndErrorTrackingLogger,
|
|
26
|
+
getUnexpectedLogErrorException,
|
|
27
|
+
IOpProcessingController,
|
|
28
|
+
ITestContainerConfig,
|
|
29
|
+
ITestObjectProvider,
|
|
30
|
+
TestObjectProvider,
|
|
24
31
|
} from "./testObjectProvider";
|
|
32
|
+
export { createSummarizer, createSummarizerFromFactory, summarizeNow } from "./TestSummaryUtils";
|
|
25
33
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from "./TestSummaryUtils";
|
|
32
|
-
export {
|
|
33
|
-
defaultTimeoutDurationMs,
|
|
34
|
-
ensureContainerConnected,
|
|
35
|
-
timeoutAwait,
|
|
36
|
-
timeoutPromise,
|
|
37
|
-
TimeoutWithError,
|
|
38
|
-
TimeoutWithValue,
|
|
34
|
+
defaultTimeoutDurationMs,
|
|
35
|
+
timeoutAwait,
|
|
36
|
+
timeoutPromise,
|
|
37
|
+
TimeoutWithError,
|
|
38
|
+
TimeoutWithValue,
|
|
39
39
|
} from "./timeoutUtils";
|
|
40
|
+
export { waitForContainerConnection } from "./containerUtils";
|
package/src/interfaces.ts
CHANGED
|
@@ -5,17 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
7
7
|
import { ISharedMap } from "@fluidframework/map";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
IFluidDataStoreContext,
|
|
10
|
+
IFluidDataStoreChannel,
|
|
11
|
+
} from "@fluidframework/runtime-definitions";
|
|
9
12
|
import { IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
10
13
|
|
|
11
14
|
export interface IProvideTestFluidObject {
|
|
12
|
-
|
|
15
|
+
readonly ITestFluidObject: ITestFluidObject;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export interface ITestFluidObject extends IProvideTestFluidObject, IFluidLoadable {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
root: ISharedMap;
|
|
20
|
+
readonly runtime: IFluidDataStoreRuntime;
|
|
21
|
+
readonly channel: IFluidDataStoreChannel;
|
|
22
|
+
readonly context: IFluidDataStoreContext;
|
|
23
|
+
getSharedObject<T = any>(id: string): Promise<T>;
|
|
21
24
|
}
|