mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-09-29 20:56:23 +00: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 { DEFAULT_LIST_EVENT_TYPE } from "../../src/commands/SetDefaultBanListCommand";
|
||||||
import { parseArguments } from "../../src/commands/UnbanBanCommand";
|
import { parseArguments } from "../../src/commands/UnbanBanCommand";
|
||||||
import { RULE_ROOM, RULE_SERVER, RULE_USER } from "../../src/models/BanList";
|
import { RULE_ROOM, RULE_SERVER, RULE_USER } from "../../src/models/BanList";
|
||||||
|
import config from "../../src/config";
|
||||||
|
|
||||||
function createTestMjolnir(defaultShortcode: string = null): Mjolnir {
|
function createTestMjolnir(defaultShortcode: string = null): Mjolnir {
|
||||||
const client = {
|
const client = {
|
||||||
@ -29,7 +30,10 @@ function createTestMjolnir(defaultShortcode: string = null): Mjolnir {
|
|||||||
throw new Error("Unknown event type");
|
throw new Error("Unknown event type");
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return <Mjolnir>{client};
|
return <Mjolnir>{
|
||||||
|
client,
|
||||||
|
config,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function createFakeEvent(command: string): any {
|
function createFakeEvent(command: string): any {
|
||||||
|
Loading…
Reference in New Issue
Block a user