Skip to content
Extraits de code Groupes Projets
Valider a6ea8897 rédigé par Andrew Morgan andrew@amorgan.xyz's avatar Andrew Morgan andrew@amorgan.xyz
Parcourir les fichiers

Fix tests to account for concurrency :)

parent 5cd3c62c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -104,9 +104,10 @@ describe("DiscordBot", () => {
let checkMsgSent = false;
discordBot.SendMatrixMessage = (...args) => checkMsgSent = true;
discordBot.OnMessageUpdate(oldMsg, newMsg);
discordBot.OnMessageUpdate(oldMsg, newMsg).then(() => {
Chai.assert.equal(checkMsgSent, false);
});
});
it("should send a matrix message on an edited discord message", () => {
discordBot = new modDiscordBot.DiscordBot(
......@@ -130,10 +131,11 @@ describe("DiscordBot", () => {
let checkMsgSent = false;
discordBot.SendMatrixMessage = (...args) => checkMsgSent = true;
discordBot.OnMessageUpdate(oldMsg, newMsg);
discordBot.OnMessageUpdate(oldMsg, newMsg).then(() => {
Chai.assert.equal(checkMsgSent, true);
});
});
});
// describe("ProcessMatrixMsgEvent()", () => {
//
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter