camelCase

This commit is contained in:
jesopo 2022-08-10 15:20:22 +00:00
parent 982a150fb2
commit 082d998ec2
4 changed files with 8 additions and 8 deletions

View File

@ -23,14 +23,14 @@ import {
RichConsoleLogger, RichConsoleLogger,
SimpleFsStorageProvider SimpleFsStorageProvider
} from "matrix-bot-sdk"; } from "matrix-bot-sdk";
import { read as config_read } from "./config"; import { read as configRead } from "./config";
import { Healthz } from "./health/healthz"; import { Healthz } from "./health/healthz";
import { Mjolnir } from "./Mjolnir"; import { Mjolnir } from "./Mjolnir";
import { patchMatrixClient } from "./utils"; import { patchMatrixClient } from "./utils";
(async function () { (async function () {
const config = config_read(); const config = configRead();
config.RUNTIME = {}; config.RUNTIME = {};

View File

@ -18,11 +18,11 @@ import * as expect from "expect";
import { Mjolnir } from "../../src/Mjolnir"; import { Mjolnir } from "../../src/Mjolnir";
import { DEFAULT_LIST_EVENT_TYPE } from "../../src/commands/SetDefaultBanListCommand"; import { DEFAULT_LIST_EVENT_TYPE } from "../../src/commands/SetDefaultBanListCommand";
import { parseArguments } from "../../src/commands/UnbanBanCommand"; import { parseArguments } from "../../src/commands/UnbanBanCommand";
import { read as config_read } from "../../src/config"; import { read as configRead } from "../../src/config";
import { RULE_ROOM, RULE_SERVER, RULE_USER } from "../../src/models/ListRule"; import { RULE_ROOM, RULE_SERVER, RULE_USER } from "../../src/models/ListRule";
function createTestMjolnir(defaultShortcode: string|null = null): Mjolnir { function createTestMjolnir(defaultShortcode: string|null = null): Mjolnir {
const config = config_read(); const config = configRead();
const client = { const client = {
// Mock `MatrixClient.getAccountData` . // Mock `MatrixClient.getAccountData` .
getAccountData: (eventType: string): Promise<any> => { getAccountData: (eventType: string): Promise<any> => {

View File

@ -1,4 +1,4 @@
import { read as config_read } from "../../src/config"; import { read as configRead } from "../../src/config";
import { makeMjolnir, teardownManagementRoom } from "./mjolnirSetupUtils"; import { makeMjolnir, teardownManagementRoom } from "./mjolnirSetupUtils";
// When Mjolnir starts (src/index.ts) it clobbers the config by resolving the management room // When Mjolnir starts (src/index.ts) it clobbers the config by resolving the management room
@ -13,7 +13,7 @@ export const mochaHooks = {
console.log("mochaHooks.beforeEach"); console.log("mochaHooks.beforeEach");
// Sometimes it takes a little longer to register users. // Sometimes it takes a little longer to register users.
this.timeout(10000); this.timeout(10000);
const config = this.config = config_read(); const config = this.config = configRead();
this.managementRoomAlias = config.managementRoom; this.managementRoomAlias = config.managementRoom;
this.mjolnir = await makeMjolnir(config); this.mjolnir = await makeMjolnir(config);
config.RUNTIME.client = this.mjolnir.client; config.RUNTIME.client = this.mjolnir.client;

View File

@ -3,10 +3,10 @@
*/ */
import { makeMjolnir } from "./mjolnirSetupUtils"; import { makeMjolnir } from "./mjolnirSetupUtils";
import { read as config_read } from '../../src/config'; import { read as configRead } from '../../src/config';
(async () => { (async () => {
const config = config_read(); const config = configRead();
let mjolnir = await makeMjolnir(config); let mjolnir = await makeMjolnir(config);
await mjolnir.start(); await mjolnir.start();
})(); })();