test: fix flaky tests on user creation (fehmer) (#5434)

This commit is contained in:
Christian Fehmer 2024-05-24 12:33:44 +02:00 committed by GitHub
parent 8f2644c2f3
commit fd3fc7ca47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,7 @@ describe("user controller test", () => {
});
it("should not create user domain is blacklisted", async () => {
["tidal.lol", "selfbot.cc"].forEach(async (domain) => {
for (const domain of ["tidal.lol", "selfbot.cc"]) {
//GIVEN
firebaseDeleteUserMock.mockResolvedValue();
@ -158,7 +158,7 @@ describe("user controller test", () => {
//user will be created in firebase from the frontend, make sure we remove it
expect(firebaseDeleteUserMock).toHaveBeenCalledWith("123456789");
});
}
});
it("should not create user if username is taken", async () => {