fix(test): cli_test now retries to move files (#1372)

This commit is contained in:
Reed von Redwitz
2023-06-28 14:47:26 +02:00
committed by GitHub
parent aff31c0f15
commit a30c6bdf5c
+9 -3
View File
@@ -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 });
}
});