Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -14,18 +14,18 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { MatrixClient, Room } from 'matrix-js-sdk/src/matrix';
|
||||
import { mocked } from 'jest-mock';
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked } from "jest-mock";
|
||||
|
||||
import { Command, Commands, getCommand } from '../src/SlashCommands';
|
||||
import { createTestClient } from './test-utils';
|
||||
import { MatrixClientPeg } from '../src/MatrixClientPeg';
|
||||
import { LocalRoom, LOCAL_ROOM_ID_PREFIX } from '../src/models/LocalRoom';
|
||||
import SettingsStore from '../src/settings/SettingsStore';
|
||||
import LegacyCallHandler from '../src/LegacyCallHandler';
|
||||
import { SdkContextClass } from '../src/contexts/SDKContext';
|
||||
import { Command, Commands, getCommand } from "../src/SlashCommands";
|
||||
import { createTestClient } from "./test-utils";
|
||||
import { MatrixClientPeg } from "../src/MatrixClientPeg";
|
||||
import { LocalRoom, LOCAL_ROOM_ID_PREFIX } from "../src/models/LocalRoom";
|
||||
import SettingsStore from "../src/settings/SettingsStore";
|
||||
import LegacyCallHandler from "../src/LegacyCallHandler";
|
||||
import { SdkContextClass } from "../src/contexts/SDKContext";
|
||||
|
||||
describe('SlashCommands', () => {
|
||||
describe("SlashCommands", () => {
|
||||
let client: MatrixClient;
|
||||
const roomId = "!room:example.com";
|
||||
let room: Room;
|
||||
|
@ -55,7 +55,7 @@ describe('SlashCommands', () => {
|
|||
jest.clearAllMocks();
|
||||
|
||||
client = createTestClient();
|
||||
jest.spyOn(MatrixClientPeg, 'get').mockReturnValue(client);
|
||||
jest.spyOn(MatrixClientPeg, "get").mockReturnValue(client);
|
||||
|
||||
room = new Room(roomId, client, client.getUserId());
|
||||
localRoom = new LocalRoom(localRoomId, client, client.getUserId());
|
||||
|
@ -63,8 +63,8 @@ describe('SlashCommands', () => {
|
|||
jest.spyOn(SdkContextClass.instance.roomViewStore, "getRoomId");
|
||||
});
|
||||
|
||||
describe('/topic', () => {
|
||||
it('sets topic', async () => {
|
||||
describe("/topic", () => {
|
||||
it("sets topic", async () => {
|
||||
const command = getCommand("/topic pizza");
|
||||
expect(command.cmd).toBeDefined();
|
||||
expect(command.args).toBeDefined();
|
||||
|
@ -226,10 +226,7 @@ describe('SlashCommands', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe.each([
|
||||
"rainbow",
|
||||
"rainbowme",
|
||||
])("/%s", (commandName: string) => {
|
||||
describe.each(["rainbow", "rainbowme"])("/%s", (commandName: string) => {
|
||||
const command = findCommand(commandName);
|
||||
|
||||
it("should return usage if no args", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue