diff --git a/test/integration/helloTest.ts b/test/integration/helloTest.ts index 3de2bb24..e2f4b320 100644 --- a/test/integration/helloTest.ts +++ b/test/integration/helloTest.ts @@ -26,4 +26,18 @@ describe("Test: !help command", function() { await client.sendMessage(this.mjolnir.managementRoomId, {msgtype: "m.text", body: "!mjolnir help"}) await reply }) + it('Mjolnir responded to !mjolnir help with extra spaces', async function() { + this.timeout(30000); + // send a messgage + await client.joinRoom(this.config.managementRoom); + // listener for getting the event reply + let reply = new Promise((resolve, reject) => { + client.on('room.message', noticeListener(this.mjolnir.managementRoomId, (event) => { + if (event.content.body.includes("Print status information")) { + resolve(event); + } + }))}); + await client.sendMessage(this.mjolnir.managementRoomId, {msgtype: "m.text", body: " !mjolnir help "}) + await reply + }) })