fix(test): cli_test now retries to move files (#1372)
This commit is contained in:
+9
-3
@@ -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 });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user