Conform more of the codebase to strictNullChecks
(#11100)
This commit is contained in:
parent
328db8fdfd
commit
7b3a4e556a
16 changed files with 30 additions and 26 deletions
|
@ -66,7 +66,7 @@ describe("DeviceSettingsHandler", () => {
|
|||
|
||||
afterEach(() => {
|
||||
MatrixClientPeg.get = () => null;
|
||||
MatrixClientPeg.safeGet = () => null;
|
||||
MatrixClientPeg.safeGet = () => new MatrixClient({ baseUrl: "foobar" });
|
||||
});
|
||||
|
||||
it("Returns the value for a disabled feature", () => {
|
||||
|
|
|
@ -208,8 +208,8 @@ describe("MessagePreviewStore", () => {
|
|||
|
||||
const preview = await store.getPreviewForRoom(room, DefaultTagID.Untagged);
|
||||
expect(preview).toBeDefined();
|
||||
expect(preview.isThreadReply).toBe(false);
|
||||
expect(preview.text).toMatchInlineSnapshot(`"@sender:server reacted 🙃 to First message"`);
|
||||
expect(preview?.isThreadReply).toBe(false);
|
||||
expect(preview?.text).toMatchInlineSnapshot(`"@sender:server reacted 🙃 to First message"`);
|
||||
});
|
||||
|
||||
it("should generate the correct preview for a reaction on a thread root", async () => {
|
||||
|
@ -227,7 +227,7 @@ describe("MessagePreviewStore", () => {
|
|||
|
||||
const preview = await store.getPreviewForRoom(room, DefaultTagID.Untagged);
|
||||
expect(preview).toBeDefined();
|
||||
expect(preview.isThreadReply).toBe(false);
|
||||
expect(preview.text).toContain("You reacted 🙃 to root event message");
|
||||
expect(preview?.isThreadReply).toBe(false);
|
||||
expect(preview?.text).toContain("You reacted 🙃 to root event message");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue