Skip to content

Commit

Permalink
Fix detached cell test
Browse files Browse the repository at this point in the history
  • Loading branch information
Abe27342 committed Jul 3, 2023
1 parent b6e4fea commit 78083dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api-report/cell.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class SharedCell<T = any> extends SharedObject<ISharedCellEvents<T>> 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<void>;
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/cell/src/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class SharedCell<T = any>
* 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);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dds/cell/src/test/cell.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 78083dc

Please sign in to comment.