From 35fcacb7675fbb35551a4122adfe670ecca40870 Mon Sep 17 00:00:00 2001 From: JeDaYoshi Date: Tue, 6 Jul 2021 18:15:37 +0000 Subject: [PATCH] Add firstCommand and do further checks on mode tests --- test/commands/mode.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/commands/mode.js b/test/commands/mode.js index a818135a..a6ea9bad 100644 --- a/test/commands/mode.js +++ b/test/commands/mode.js @@ -17,6 +17,7 @@ describe("Commands", function () { }); const testableNetwork = { + firstCommand: null, lastCommand: null, nick: "xPaw", irc: { @@ -28,6 +29,7 @@ describe("Commands", function () { }, }, raw(...args) { + testableNetwork.firstCommand = testableNetwork.lastCommand; testableNetwork.lastCommand = args.join(" "); }, }, @@ -41,6 +43,7 @@ describe("Commands", function () { }, }, raw(...args) { + testableNetworkNoSupports.firstCommand = testableNetworkNoSupports.lastCommand; testableNetworkNoSupports.lastCommand = args.join(" "); }, }, @@ -115,6 +118,9 @@ describe("Commands", function () { "idk", "thelounge", ]); + expect(testableNetwork.firstCommand).to.equal( + "MODE #thelounge -vvvv xPaw Max-P hey idk" + ); expect(testableNetwork.lastCommand).to.equal("MODE #thelounge -v thelounge"); });