diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-09-04 11:28:15 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 01:28:15 +0000 |
commit | b72d1a7256fd141c644024b8d9e15fa11234109e (patch) | |
tree | 584371371cf343a407b3881a1300b9da1cc186da /tests/unit/stat_test.ts | |
parent | 105c571fb6ba4d9b9404b5998eb6e17f0efdd79f (diff) |
BREAKING(fs): remove `Deno.fstat[Sync]()` (#25351)
Towards #22079
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'tests/unit/stat_test.ts')
-rw-r--r-- | tests/unit/stat_test.ts | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/unit/stat_test.ts b/tests/unit/stat_test.ts index f9d780031..950ffa81b 100644 --- a/tests/unit/stat_test.ts +++ b/tests/unit/stat_test.ts @@ -1,49 +1,14 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file no-deprecated-deno-api - import { assert, assertEquals, assertRejects, assertThrows, - DENO_FUTURE, pathToAbsoluteFileUrl, } from "./test_util.ts"; Deno.test( - { ignore: DENO_FUTURE, permissions: { read: true } }, - function fstatSyncSuccess() { - using file = Deno.openSync("README.md"); - const fileInfo = Deno.fstatSync(file.rid); - assert(fileInfo.isFile); - assert(!fileInfo.isSymlink); - assert(!fileInfo.isDirectory); - assert(fileInfo.size); - assert(fileInfo.atime); - assert(fileInfo.mtime); - // The `birthtime` field is not available on Linux before kernel version 4.11. - assert(fileInfo.birthtime || Deno.build.os === "linux"); - }, -); - -Deno.test( - { ignore: DENO_FUTURE, permissions: { read: true } }, - async function fstatSuccess() { - using file = await Deno.open("README.md"); - const fileInfo = await Deno.fstat(file.rid); - assert(fileInfo.isFile); - assert(!fileInfo.isSymlink); - assert(!fileInfo.isDirectory); - assert(fileInfo.size); - assert(fileInfo.atime); - assert(fileInfo.mtime); - // The `birthtime` field is not available on Linux before kernel version 4.11. - assert(fileInfo.birthtime || Deno.build.os === "linux"); - }, -); - -Deno.test( { permissions: { read: true, write: true } }, function statSyncSuccess() { const readmeInfo = Deno.statSync("README.md"); |