Use MatrixClientPeg::safeGet in src/{stores,hooks,components/structures}/* (#10988)
This commit is contained in:
parent
707fd9ccf0
commit
dd46db4817
34 changed files with 139 additions and 130 deletions
|
@ -24,6 +24,10 @@ jest.spyOn(MatrixClientPeg, "get").mockReturnValue({
|
|||
getUserId: () => "@me:example.com",
|
||||
getSafeUserId: () => "@me:example.com",
|
||||
} as unknown as MatrixClient);
|
||||
jest.spyOn(MatrixClientPeg, "safeGet").mockReturnValue({
|
||||
getUserId: () => "@me:example.com",
|
||||
getSafeUserId: () => "@me:example.com",
|
||||
} as unknown as MatrixClient);
|
||||
|
||||
describe("PollStartEventPreview", () => {
|
||||
it("shows the question for a poll I created", async () => {
|
||||
|
|
|
@ -63,6 +63,7 @@ describe("StopGapWidgetDriver", () => {
|
|||
stubClient();
|
||||
client = mocked(MatrixClientPeg.safeGet());
|
||||
client.getUserId.mockReturnValue("@alice:example.org");
|
||||
client.getSafeUserId.mockReturnValue("@alice:example.org");
|
||||
});
|
||||
|
||||
it("auto-approves capabilities of virtual Element Call widgets", async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue