mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
make sure unit test has a config
This commit is contained in:
parent
62794562a4
commit
fe9edad1d3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user