Skip to content

Commit 165359e

Browse files
toger5robintown
andauthored
Review simpler return value
Co-authored-by: Robin <[email protected]>
1 parent 637606e commit 165359e

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
@@ -1529,7 +1529,7 @@ describe('ClientWidgetApi', () => {
15291529
it('reads events from all rooms', async () => {
15301530
const roomId = '!room:example.org';
15311531
const otherRoomId = '!other-room:example.org';
1532-
jest.spyOn(clientWidgetApi,"getWidgetVersions").mockReturnValue(new Promise(r=>r([])));
1532+
jest.spyOn(clientWidgetApi,"getWidgetVersions").mockResolvedValue([]);
15331533
const event = createRoomEvent({ room_id: roomId, type: 'net.example.test', content: 'test' });
15341534
const otherRoomEvent = createRoomEvent({ room_id: otherRoomId, type: 'net.example.test', content: 'hi' });
15351535
driver.getKnownRooms.mockReturnValue([roomId, otherRoomId]);

0 commit comments

Comments
 (0)