Prettier and strict
parent
7c2dd7224f
commit
4db1928bcd
|
@ -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 () => {
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue