diff --git a/test/integration/helloTest.ts b/test/integration/helloTest.ts index 7099d55..91c083d 100644 --- a/test/integration/helloTest.ts +++ b/test/integration/helloTest.ts @@ -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(); - }) })