From 9a8f716e50387b0d1410ef6ab55881cce2121a17 Mon Sep 17 00:00:00 2001 From: Xicri Date: Thu, 11 Jan 2024 14:07:01 +0900 Subject: [PATCH] refactor: remove duplicate `sleep()` function --- scripts/vrt-screenshot.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/vrt-screenshot.ts b/scripts/vrt-screenshot.ts index 04b87c66..f4a2dd35 100644 --- a/scripts/vrt-screenshot.ts +++ b/scripts/vrt-screenshot.ts @@ -2,12 +2,7 @@ import { chromium } from "playwright"; import { mkdir, rm } from "node:fs/promises"; import { join } from "node:path"; import { fileURLToPath } from "node:url"; - -// TODO replace with `import { sleep } from "../libs/utils.js";` -const sleep = async (ms) => - new Promise(resolve => - setTimeout(() => resolve(), ms) - ); +import { sleep } from "../libs/utils"; const __dirname = fileURLToPath(new URL(".", import.meta.url));