Skip to content

Commit de97f9e

Browse files
toger5robintown
andcommitted
Review simpler return value
Co-authored-by: Robin <[email protected]>
1 parent 03c7300 commit de97f9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/ClientWidgetApi-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ describe("ClientWidgetApi", () => {
14821482
it("reads events from all rooms", async () => {
14831483
const roomId = "!room:example.org";
14841484
const otherRoomId = "!other-room:example.org";
1485-
jest.spyOn(clientWidgetApi, "getWidgetVersions").mockReturnValue(new Promise((r) => r([])));
1485+
jest.spyOn(clientWidgetApi, "getWidgetVersions").mockResolvedValue([]);
14861486
const event = createRoomEvent({ room_id: roomId, type: "net.example.test", content: "test" });
14871487
const otherRoomEvent = createRoomEvent({ room_id: otherRoomId, type: "net.example.test", content: "hi" });
14881488
driver.getKnownRooms.mockReturnValue([roomId, otherRoomId]);

0 commit comments

Comments
 (0)