From a30c6bdf5c00301e50be053082be77c6a3acbbe0 Mon Sep 17 00:00:00 2001 From: Reed von Redwitz Date: Wed, 28 Jun 2023 14:47:26 +0200 Subject: [PATCH] fix(test): cli_test now retries to move files (#1372) --- tests/cli_test.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/cli_test.ts b/tests/cli_test.ts index 6b777977..6ec5b4b2 100644 --- a/tests/cli_test.ts +++ b/tests/cli_test.ts @@ -376,16 +376,22 @@ Deno.test("fresh-update", async function fn(t) { try { Deno.mkdirSync(tmpDirName + "/src"); names.forEach((x) => { - Deno.rename(path.join(tmpDirName, x), path.join(tmpDirName, "src", x)); + Deno.renameSync( + path.join(tmpDirName, x), + path.join(tmpDirName, "src", x), + ); }); await updateAndVerify( /The manifest has been generated for (?!0 routes and 0 islands)\d+ routes and \d+ islands./, ); } finally { names.forEach((x) => { - Deno.rename(path.join(tmpDirName, "src", x), path.join(tmpDirName, x)); + Deno.renameSync( + path.join(tmpDirName, "src", x), + path.join(tmpDirName, x), + ); }); - await retry(() => Deno.remove(tmpDirName + "/src", { recursive: true })); + Deno.removeSync(tmpDirName + "/src", { recursive: true }); } });