Skip to content

Commit

Permalink
Merge pull request #327 from mkobayashime/drop-node-timer
Browse files Browse the repository at this point in the history
Stop using `setTimeout` of `node:timers`
  • Loading branch information
mkobayashime authored Oct 14, 2024
2 parents abfd532 + fccfa02 commit b55ef3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/getAnnouncements.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { setTimeout as setTimerTimeout } from "node:timers/promises";
import { parse } from "date-fns";
import * as O from "fp-ts/lib/Option.js";
import md5 from "md5";
Expand Down Expand Up @@ -146,7 +145,7 @@ export const getAnnouncements = async ({

await anchorElement?.click();

await setTimerTimeout(2000);
await new Promise((resolve) => setTimeout(resolve, 2000));
await waitForAnnouncementToBeLoaded({ page });

announcements.push({
Expand Down

0 comments on commit b55ef3f

Please sign in to comment.