Fix helloTest hooks running before global hooks.

This commit is contained in:
gnuxie 2021-10-20 12:11:00 +01:00
parent c52084c58a
commit 7a20b5a212

View File

@ -1,12 +1,15 @@
import config from "../../src/config";
import { newTestUser, noticeListener } from "./clientHelper"
describe("Test: !help command", () => {
describe("Test: !help command", function() {
let client;
before(async function () {
this.beforeEach(async function () {
client = await newTestUser(true);
await client.start();
})
this.afterEach(async function () {
await client.stop();
})
it('Mjolnir responded to !mjolnir help', async function() {
this.timeout(30000);
console.log(`management room ${config.managementRoom}`);
@ -24,7 +27,4 @@ describe("Test: !help command", () => {
await client.sendMessage(config.managementRoom, {msgtype: "m.text", body: "!mjolnir help"})
await reply
})
after(async function () {
await client.stop();
})
})