Apply strictNullChecks
to src/components/views/rooms/*
(#10875)
* fix everything except notificationbadge * unit test ThirdPartyMemberInfo * fix RoomPreviewBar dm tests * lint * test PinnedEventTile
This commit is contained in:
parent
08c0f332b3
commit
74d30187a4
13 changed files with 326 additions and 17 deletions
|
@ -148,6 +148,12 @@ describe("<EditMessageComposer/>", () => {
|
|||
expect(mockClient.sendMessage).toHaveBeenCalledWith(editedEvent.getRoomId()!, null, expectedBody);
|
||||
});
|
||||
|
||||
it("should throw when room for message is not found", () => {
|
||||
mockClient.getRoom.mockReturnValue(null);
|
||||
const editState = new EditorStateTransfer(editedEvent);
|
||||
expect(() => getComponent(editState)).toThrow("Cannot find room for event !abc:test");
|
||||
});
|
||||
|
||||
describe("createEditContent", () => {
|
||||
it("sends plaintext messages correctly", () => {
|
||||
const model = new EditorModel([], createPartCreator());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue