Add firstCommand and do further checks on mode tests
This commit is contained in:
parent
d96704835a
commit
35fcacb767
@ -17,6 +17,7 @@ describe("Commands", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const testableNetwork = {
|
const testableNetwork = {
|
||||||
|
firstCommand: null,
|
||||||
lastCommand: null,
|
lastCommand: null,
|
||||||
nick: "xPaw",
|
nick: "xPaw",
|
||||||
irc: {
|
irc: {
|
||||||
@ -28,6 +29,7 @@ describe("Commands", function () {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
raw(...args) {
|
raw(...args) {
|
||||||
|
testableNetwork.firstCommand = testableNetwork.lastCommand;
|
||||||
testableNetwork.lastCommand = args.join(" ");
|
testableNetwork.lastCommand = args.join(" ");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -41,6 +43,7 @@ describe("Commands", function () {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
raw(...args) {
|
raw(...args) {
|
||||||
|
testableNetworkNoSupports.firstCommand = testableNetworkNoSupports.lastCommand;
|
||||||
testableNetworkNoSupports.lastCommand = args.join(" ");
|
testableNetworkNoSupports.lastCommand = args.join(" ");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -115,6 +118,9 @@ describe("Commands", function () {
|
|||||||
"idk",
|
"idk",
|
||||||
"thelounge",
|
"thelounge",
|
||||||
]);
|
]);
|
||||||
|
expect(testableNetwork.firstCommand).to.equal(
|
||||||
|
"MODE #thelounge -vvvv xPaw Max-P hey idk"
|
||||||
|
);
|
||||||
expect(testableNetwork.lastCommand).to.equal("MODE #thelounge -v thelounge");
|
expect(testableNetwork.lastCommand).to.equal("MODE #thelounge -v thelounge");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user