Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Jul 30, 2024
1 parent f4faaae commit c412a44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/stores/widgets/StopGapWidgetDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
/**
* @experimental Part of MSC4140 & MSC4157
*/
public async updateDelayedEvent(
delayId: string,
action: UpdateDelayedEventAction,
): Promise<void> {
public async updateDelayedEvent(delayId: string, action: UpdateDelayedEventAction): Promise<void> {
const client = MatrixClientPeg.get();

if (!client) throw new Error("Not in a room or not attached to a client");
Expand Down
4 changes: 3 additions & 1 deletion test/stores/widgets/StopGapWidgetDriver-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ describe("StopGapWidgetDriver", () => {
it("fails to update delayed events", async () => {
const errorMessage = "Cannot restart this delayed event";
client._unstable_updateDelayedEvent.mockRejectedValue(new Error(errorMessage));
await expect(driver.updateDelayedEvent("id", UpdateDelayedEventAction.Restart)).rejects.toThrow(errorMessage);
await expect(driver.updateDelayedEvent("id", UpdateDelayedEventAction.Restart)).rejects.toThrow(

Check failure on line 476 in test/stores/widgets/StopGapWidgetDriver-test.ts

View workflow job for this annotation

GitHub Actions / Jest (2)

StopGapWidgetDriver › updateDelayedEvent › fails to update delayed events

TypeError: Cannot read properties of undefined (reading 'Restart') at Object.Restart (test/stores/widgets/StopGapWidgetDriver-test.ts:476:83)
errorMessage,
);
});
});

Expand Down

0 comments on commit c412a44

Please sign in to comment.