1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-02 20:38:47 -05:00

test(ext/node): enable parallel/test-fs-promises-file-handle-stat.js (#27074)

This commit is contained in:
Yoshiya Hinosawa 2024-11-27 23:51:23 +09:00 committed by GitHub
parent 2bbfef137c
commit e943c6a25d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 1 deletions

View file

@ -338,6 +338,7 @@
"test-fs-open-numeric-flags.js",
"test-fs-open.js",
"test-fs-opendir.js",
"test-fs-promises-file-handle-stat.js",
"test-fs-promises-writefile-with-fd.js",
"test-fs-read-stream-autoClose.js",
"test-fs-read-stream-concurrent-reads.js",

View file

@ -822,7 +822,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co
- [parallel/test-fs-promises-file-handle-read-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read-worker.js)
- [parallel/test-fs-promises-file-handle-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read.js)
- [parallel/test-fs-promises-file-handle-readFile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-readFile.js)
- [parallel/test-fs-promises-file-handle-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stat.js)
- [parallel/test-fs-promises-file-handle-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stream.js)
- [parallel/test-fs-promises-file-handle-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-sync.js)
- [parallel/test-fs-promises-file-handle-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-truncate.js)

View file

@ -0,0 +1,30 @@
// deno-fmt-ignore-file
// deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 20.11.1
// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually.
'use strict';
const common = require('../common');
// The following tests validate base functionality for the fs.promises
// FileHandle.stat method.
const { open } = require('fs').promises;
const tmpdir = require('../common/tmpdir');
const assert = require('assert');
tmpdir.refresh();
async function validateStat() {
const filePath = tmpdir.resolve('tmp-read-file.txt');
const fileHandle = await open(filePath, 'w+');
const stats = await fileHandle.stat();
assert.ok(stats.mtime instanceof Date);
await fileHandle.close();
}
validateStat()
.then(common.mustCall());