Replace setImmediate with setTimeout (#12614)
This commit is contained in:
parent
21ae29c002
commit
8b4e3e6647
21 changed files with 46 additions and 39 deletions
|
@ -323,7 +323,6 @@ describe("RoomListStore", () => {
|
|||
const algorithmSpy = jest.spyOn(store.algorithm, "handleRoomUpdate").mockReturnValue(undefined);
|
||||
// @ts-ignore cheat and call protected fn
|
||||
store.onAction({ action: "MatrixActions.accountData", event, previousEvent });
|
||||
// flush setImmediate
|
||||
await flushPromises();
|
||||
|
||||
expect(algorithmSpy).toHaveBeenCalledWith(normalRoom, RoomUpdateCause.PossibleMuteChange);
|
||||
|
@ -346,7 +345,6 @@ describe("RoomListStore", () => {
|
|||
|
||||
// @ts-ignore cheat and call protected fn
|
||||
store.onAction({ action: "MatrixActions.accountData", event, previousEvent });
|
||||
// flush setImmediate
|
||||
await flushPromises();
|
||||
|
||||
// only one call to update made for normalRoom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue