Skip to content

Commit

Permalink
Remove old comment
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Apr 11, 2024
1 parent 3588e1d commit bee751b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unit-tests/tchap/lib/ExpiredAccountHandler-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ describe("ExpiredAccountHandler", () => {
jest.clearAllMocks();
});

// TODO : it would be nice to test that our handler is propoerly registered on app load, in src/vector/index.ts
// Gonna require a lot of mocking...
it("displays dialog when account is expired", () => {
// handler instance is created when import ExpiredAccountHandler is run.
// handler instance is created when "import ExpiredAccountHandler" is run.
ExpiredAccountHandler.register();

// Simulate start of app, for handler to initialise
defaultDispatcher.dispatch({ action: "will_start_client" }, true);

// Simulate expired error
// cli.on(HttpApiEvent.ORG_MATRIX_EXPIRED_ACCOUNT)
// this.eventEmitter.emit(HttpApiEvent.ORG_MATRIX_EXPIRED_ACCOUNT, err);
mockClient.emit(HttpApiEvent.ORG_MATRIX_EXPIRED_ACCOUNT);

expect(Modal.createDialog).toHaveBeenCalledWith(
Expand Down

0 comments on commit bee751b

Please sign in to comment.