0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-12 16:59:32 -05:00

fix assertion

This commit is contained in:
Yoshiya Hinosawa 2024-11-05 20:21:28 +09:00
parent 33b21f5b33
commit 299cb34dee
No known key found for this signature in database
GPG key ID: 9017DB4559488785

View file

@ -32,7 +32,12 @@ Deno.test(
tempInfo.birthtime === null || now - tempInfo.birthtime.valueOf() < 1000,
);
assert(tempInfo.ctime !== null && now - tempInfo.ctime.valueOf() < 1000);
assertEquals(tempInfo.mode! & 0o777, 0o600);
const mode = tempInfo.mode! & 0o777;
if (Deno.build.os === "windows") {
assertEquals(mode, 0o666);
} else {
assertEquals(mode, 0o600);
}
const readmeInfoByUrl = Deno.statSync(pathToAbsoluteFileUrl("README.md"));
assert(readmeInfoByUrl.isFile);