diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-08-08 20:16:14 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-08-08 22:06:44 +0200 |
commit | febb972dd4068bbcdbd7c416068ec46b1775de16 (patch) | |
tree | 88f83a9ff5e90becfe09adb0dbc2e39cd34c469a /cli/tests/unit | |
parent | f17eb634faa01c0d03cd2886e740357ab9cbb5a1 (diff) |
test(cli/stat_test): older versions of Linux don't support `birthtime` (#6991)
Diffstat (limited to 'cli/tests/unit')
-rw-r--r-- | cli/tests/unit/stat_test.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/tests/unit/stat_test.ts b/cli/tests/unit/stat_test.ts index 092724395..a7911b9c9 100644 --- a/cli/tests/unit/stat_test.ts +++ b/cli/tests/unit/stat_test.ts @@ -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); }); |