From 78083dc645ce9ed2a428e66792abb99eae735972 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Mon, 3 Jul 2023 11:41:16 -0700 Subject: [PATCH] Fix detached cell test --- api-report/cell.api.md | 2 +- packages/dds/cell/src/cell.ts | 2 +- packages/dds/cell/src/test/cell.spec.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api-report/cell.api.md b/api-report/cell.api.md index d732ad595fba..02027fcfc019 100644 --- a/api-report/cell.api.md +++ b/api-report/cell.api.md @@ -51,7 +51,7 @@ export class SharedCell extends SharedObject> impl getAttribution(): AttributionKey | undefined; static getFactory(): IChannelFactory; // @alpha - static getFactory(options: CellOptions): IChannelFactory; + static getFactory(options?: CellOptions): IChannelFactory; protected initializeLocalCore(): void; // (undocumented) protected loadCore(storage: IChannelStorageService): Promise; diff --git a/packages/dds/cell/src/cell.ts b/packages/dds/cell/src/cell.ts index 5960e73ae111..10c8e1a74354 100644 --- a/packages/dds/cell/src/cell.ts +++ b/packages/dds/cell/src/cell.ts @@ -85,7 +85,7 @@ export class SharedCell * time and do not apply to subsequent loads. * @alpha */ - public static getFactory(options: CellOptions): IChannelFactory; + public static getFactory(options?: CellOptions): IChannelFactory; public static getFactory(options?: CellOptions): IChannelFactory { return new CellFactory(options); } diff --git a/packages/dds/cell/src/test/cell.spec.ts b/packages/dds/cell/src/test/cell.spec.ts index bb58f9d8b1fe..d95a0a2b3d9b 100644 --- a/packages/dds/cell/src/test/cell.spec.ts +++ b/packages/dds/cell/src/test/cell.spec.ts @@ -40,8 +40,8 @@ function createConnectedCell( function createDetachedCell(id: string, options?: CellOptions): ISharedCell { const dataStoreRuntime = new MockFluidDataStoreRuntime(); dataStoreRuntime.options = options ?? dataStoreRuntime.options; - const subCell = new SharedCell(id, dataStoreRuntime, CellFactory.Attributes); - return subCell; + const factory = SharedCell.getFactory(options); + return new SharedCell(id, dataStoreRuntime, factory.attributes); } function createCellForReconnection(