From 531546bf4032ce659ef34e44a96f3ed81e35f681 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:28:18 +0100 Subject: [PATCH] test(signup): fix flaky test --- cli/tests/unit/signup.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/tests/unit/signup.test.ts b/cli/tests/unit/signup.test.ts index a6aee95486..14d4ec65a0 100644 --- a/cli/tests/unit/signup.test.ts +++ b/cli/tests/unit/signup.test.ts @@ -30,6 +30,8 @@ describe("signup", () => { }); it("should allow to signup and return the user data", async () => { + const startBlock = await signer.provider?.getBlockNumber(); + const signUpData = await signup({ maciAddress: maciAddresses.maciAddress, maciPubKey: user.pubKey.serialize(), @@ -38,7 +40,7 @@ describe("signup", () => { const registeredUserData = await isRegisteredUser({ maciAddress: maciAddresses.maciAddress, - startBlock: await signer.provider?.getBlockNumber(), + startBlock, maciPubKey: user.pubKey.serialize(), signer, });