Skip to content

Commit e4b30af

Browse files
committed
test: make options optional in patchCollectionOptions
1 parent a88b730 commit e4b30af

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/tools/unified-spec-runner/entities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export class EntitiesMap<E = Entity> extends Map<string, E> {
382382
const db = map.getEntity('db', entity.collection.database);
383383
const collection = db.collection(
384384
entity.collection.collectionName,
385-
patchCollectionOptions(entity.collection.collectionOptions!)
385+
patchCollectionOptions(entity.collection.collectionOptions)
386386
);
387387
map.set(entity.collection.id, collection);
388388
} else if ('session' in entity) {

test/tools/unified-spec-runner/unified-utils.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ export function patchDbOptions(options: CollectionOrDatabaseOptions): DbOptions
176176
return { ...options } as DbOptions;
177177
}
178178

179-
export function patchCollectionOptions(options: CollectionOrDatabaseOptions): CollectionOptions {
179+
export function patchCollectionOptions(
180+
options: CollectionOrDatabaseOptions = {}
181+
): CollectionOptions {
180182
// TODO
181183
return { ...options } as CollectionOptions;
182184
}

0 commit comments

Comments
 (0)