refactor: leverage native async setTimeout rather than delay

This commit is contained in:
Matt Travi
2023-05-22 22:25:22 -05:00
parent 42385d0f96
commit ab4fe4c3d4
4 changed files with 5 additions and 25 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
import path, { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { setTimeout } from "node:timers/promises";
import Docker from "dockerode";
import getStream from "get-stream";
import got from "got";
import delay from "delay";
import pRetry from "p-retry";
const IMAGE = "verdaccio/verdaccio:5";
@@ -33,7 +33,7 @@ export async function start() {
});
await container.start();
await delay(4000);
await setTimeout(4000);
try {
// Wait for the registry to be ready