summaryrefslogtreecommitdiff
path: root/cli/tests/unit/utime_test.ts
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-24 10:31:52 +1100
committerGitHub <noreply@github.com>2024-01-24 00:31:52 +0100
commit2f47ec6c3a583c8323a06c386feeaee4fbf75edc (patch)
tree92511f544d3b8466fb84fa40f3e68163a4e97324 /cli/tests/unit/utime_test.ts
parent947ce41e99637dae4cf46126b8bb2d4107fb9913 (diff)
feat: `Deno.FsFile.dataSync()` and `Deno.FsFile.dataSyncSync()` (#22019)
This change: 1. Implements `Deno.FsFile.dataSync()` and `Deno.FsFile.dataSyncSync()`. 2. Deprecates `Deno.fdatasync()` and `Deno.fdatasyncSync()` for removal in Deno v2, in favour of the above corresponding methods. 3. Replaces use of `Deno.fdatasync()` and `Deno.fdatasyncSync()` with the above instance methods. Related #21995
Diffstat (limited to 'cli/tests/unit/utime_test.ts')
-rw-r--r--cli/tests/unit/utime_test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/unit/utime_test.ts b/cli/tests/unit/utime_test.ts
index 02566bad6..48f4f405a 100644
--- a/cli/tests/unit/utime_test.ts
+++ b/cli/tests/unit/utime_test.ts
@@ -19,7 +19,7 @@ Deno.test(
const atime = 1000;
const mtime = 50000;
await Deno.futime(file.rid, atime, mtime);
- await Deno.fdatasync(file.rid);
+ await file.dataSync();
const fileInfo = Deno.statSync(filename);
assertEquals(fileInfo.atime, new Date(atime * 1000));
@@ -40,7 +40,7 @@ Deno.test(
const atime = 1000;
const mtime = 50000;
Deno.futimeSync(file.rid, atime, mtime);
- Deno.fdatasyncSync(file.rid);
+ file.dataSyncSync();
const fileInfo = Deno.statSync(filename);
assertEquals(fileInfo.atime, new Date(atime * 1000));