Refactor stores and their relationship to the MatrixClientPeg (#124)
* Refactor stores and their relationship to the MatrixClientPeg to avoid import cycles and webpack weirdness Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
31bd10e887
commit
197168b3ba
28 changed files with 71 additions and 66 deletions
|
@ -40,7 +40,7 @@ describe("OwnProfileStore", () => {
|
|||
displayname: "Display Name",
|
||||
avatar_url: "mxc://example.com/abc123",
|
||||
});
|
||||
await ownProfileStore.start();
|
||||
await ownProfileStore.useUnitTestClient(client);
|
||||
|
||||
expect(onUpdate).toHaveBeenCalled();
|
||||
expect(ownProfileStore.displayName).toBe("Display Name");
|
||||
|
@ -54,7 +54,7 @@ describe("OwnProfileStore", () => {
|
|||
errcode: "M_NOT_FOUND",
|
||||
}),
|
||||
);
|
||||
await ownProfileStore.start();
|
||||
await ownProfileStore.useUnitTestClient(client);
|
||||
|
||||
expect(onUpdate).toHaveBeenCalled();
|
||||
expect(ownProfileStore.displayName).toBe(client.getSafeUserId());
|
||||
|
@ -69,7 +69,7 @@ describe("OwnProfileStore", () => {
|
|||
}),
|
||||
);
|
||||
try {
|
||||
await ownProfileStore.start();
|
||||
await ownProfileStore.useUnitTestClient(client);
|
||||
} catch (ignore) {}
|
||||
|
||||
expect(onUpdate).not.toHaveBeenCalled();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue