0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

test(cli/stat_test): older versions of Linux don't support birthtime (#6991)

This commit is contained in:
Bert Belder 2020-08-08 20:16:14 +02:00
parent f17eb634fa
commit febb972dd4
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -17,7 +17,8 @@ unitTest({ perms: { read: true } }, function fstatSyncSuccess(): void {
assert(fileInfo.size);
assert(fileInfo.atime);
assert(fileInfo.mtime);
assert(fileInfo.birthtime);
// The `birthtime` field is not available on Linux before kernel version 4.11.
assert(fileInfo.birthtime || Deno.build.os === "linux");
Deno.close(file.rid);
});
@ -33,7 +34,8 @@ unitTest({ perms: { read: true } }, async function fstatSuccess(): Promise<
assert(fileInfo.size);
assert(fileInfo.atime);
assert(fileInfo.mtime);
assert(fileInfo.birthtime);
// The `birthtime` field is not available on Linux before kernel version 4.11.
assert(fileInfo.birthtime || Deno.build.os === "linux");
Deno.close(file.rid);
});