1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Enable tsc alwaysStrict, strictBindCallApply, noImplicitThis (#9600)

* Enable tsc alwaysStrict

* Enable tsc strictBindCallApply

* Enable tsc noImplicitThis

* Add d.ts

* Improve types

* Add ?

* Increase coverage

* Improve coverage
This commit is contained in:
Michael Telatynski
2022-11-21 11:24:59 +00:00
committed by GitHub
parent 0b54699829
commit 8c0d202df4
23 changed files with 188 additions and 68 deletions

View File

@ -225,4 +225,19 @@ describe('SlashCommands', () => {
expect(client.leaveRoomChain).toHaveBeenCalledWith("room-id", expect.anything());
});
});
describe.each([
"rainbow",
"rainbowme",
])("/%s", (commandName: string) => {
const command = findCommand(commandName);
it("should return usage if no args", () => {
expect(command.run(roomId, null, null).error).toBe(command.getUsage());
});
it("should make things rainbowy", () => {
return expect(command.run(roomId, null, "this is a test message").promise).resolves.toMatchSnapshot();
});
});
});