Prettier and strict

pull/28788/head^2
Kegan Dougal 2023-01-19 12:49:20 +00:00
parent 7c2dd7224f
commit 4db1928bcd
2 changed files with 15 additions and 21 deletions

View File

@ -113,10 +113,10 @@ describe("SlidingSyncManager", () => {
); );
return; return;
} }
expect(slidingSync.setListRanges).toBeCalledWith( expect(slidingSync.setListRanges).toBeCalledWith(SlidingSyncManager.ListSearch, [
SlidingSyncManager.ListSearch, [0, batchSize - 1],
[[0, batchSize - 1], range], range,
); ]);
}); });
}); });
it("handles accounts with zero rooms", async () => { it("handles accounts with zero rooms", async () => {

View File

@ -85,14 +85,11 @@ describe("SlidingRoomListStore", () => {
context._SpaceStore.emit(UPDATE_SELECTED_SPACE, spaceRoomId, false); context._SpaceStore.emit(UPDATE_SELECTED_SPACE, spaceRoomId, false);
await p; await p;
expect(context._SlidingSyncManager.ensureListRegistered).toHaveBeenCalledWith( expect(context._SlidingSyncManager.ensureListRegistered).toHaveBeenCalledWith(DefaultTagID.Untagged, {
DefaultTagID.Untagged, filters: expect.objectContaining({
{ spaces: [spaceRoomId],
filters: expect.objectContaining({ }),
spaces: [spaceRoomId], });
}),
},
);
}); });
it("alters 'filters.spaces' on the DefaultTagID.Untagged list if it loads with an active space", async () => { it("alters 'filters.spaces' on the DefaultTagID.Untagged list if it loads with an active space", async () => {
@ -138,14 +135,11 @@ describe("SlidingRoomListStore", () => {
context._SpaceStore.emit(UPDATE_SELECTED_SPACE, spaceRoomId, false); context._SpaceStore.emit(UPDATE_SELECTED_SPACE, spaceRoomId, false);
await p; await p;
expect(context._SlidingSyncManager.ensureListRegistered).toHaveBeenCalledWith( expect(context._SlidingSyncManager.ensureListRegistered).toHaveBeenCalledWith(DefaultTagID.Untagged, {
DefaultTagID.Untagged, filters: expect.objectContaining({
{ spaces: [spaceRoomId, subSpace1, subSpace2],
filters: expect.objectContaining({ }),
spaces: [spaceRoomId, subSpace1, subSpace2], });
}),
},
);
}); });
}); });
@ -168,7 +162,7 @@ describe("SlidingRoomListStore", () => {
await store.start(); await store.start();
const roomA = "!a:localhost"; const roomA = "!a:localhost";
const roomB = "!b:localhost"; const roomB = "!b:localhost";
const keyToListData = { const keyToListData: Record<string, { joinedCount: number; roomIndexToRoomId: Record<number, string> }> = {
[DefaultTagID.Untagged]: { [DefaultTagID.Untagged]: {
joinedCount: 10, joinedCount: 10,
roomIndexToRoomId: { roomIndexToRoomId: {