Skip to content

Commit

Permalink
test(v1_identities_updateIdentity.happy.test.ts): add delay before qu…
Browse files Browse the repository at this point in the history
…erying ratelimits to allow time for data to be saved in the database
  • Loading branch information
chronark committed Sep 24, 2024
1 parent 63d57ee commit 88bd752
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ test("sets new ratelimits", async (t) => {

expect(res.status, `expected 200, received: ${JSON.stringify(res, null, 2)}`).toBe(200);

await new Promise((r) => setTimeout(r, 2000));

const found = await h.db.primary.query.ratelimits.findMany({
where: (table, { eq }) => eq(table.identityId, identity.id),
});

console.log({ found });
expect(found.length).toBe(ratelimits.length);
for (const rl of ratelimits) {
expect(
Expand Down

0 comments on commit 88bd752

Please sign in to comment.