Skip to content

Commit

Permalink
unflake test
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Jan 22, 2025
1 parent 0ba1f2f commit d3e5a2e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/integration/commands/redactCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ describe("Test: The redaction command - if admin", function () {
moderator.stop();
}

function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
await delay(700);
await getMessagesByUserIn(moderator, badUserId, targetRoom, 1000, function (events) {
events.map((e) => {
if (e.type === "m.room.member") {
Expand All @@ -75,7 +79,7 @@ describe("Test: The redaction command - if admin", function () {
1,
"Only membership should be left on the membership even when it has been redacted.",
);
} else if (Object.keys(e.content).length !== 0) {
} else if (Object.keys(e.content).length !== 0 && e.type != "m.room.redaction") {
throw new Error(`This event should have been redacted: ${JSON.stringify(e, null, 2)}`);
}
});
Expand Down

0 comments on commit d3e5a2e

Please sign in to comment.