make sure unit test has a config

This commit is contained in:
gnuxie 2022-07-12 18:21:00 +01:00
parent 62794562a4
commit fe9edad1d3

View File

@ -19,6 +19,7 @@ import { Mjolnir } from "../../src/Mjolnir";
import { DEFAULT_LIST_EVENT_TYPE } from "../../src/commands/SetDefaultBanListCommand";
import { parseArguments } from "../../src/commands/UnbanBanCommand";
import { RULE_ROOM, RULE_SERVER, RULE_USER } from "../../src/models/BanList";
import config from "../../src/config";
function createTestMjolnir(defaultShortcode: string = null): Mjolnir {
const client = {
@ -29,7 +30,10 @@ function createTestMjolnir(defaultShortcode: string = null): Mjolnir {
throw new Error("Unknown event type");
},
};
return <Mjolnir>{client};
return <Mjolnir>{
client,
config,
};
}
function createFakeEvent(command: string): any {