mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
71d7707792
Co-authored-by: Benjamin Gruenbaum <benjamingr@gmail.com> PR-URL: https://github.com/nodejs/node/pull/48518 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
13 lines
268 B
JavaScript
13 lines
268 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { promises: fs } = require('fs');
|
|
|
|
async function doOpen() {
|
|
const fh = await fs.open(__filename);
|
|
fh.on('close', common.mustCall());
|
|
await fh[Symbol.asyncDispose]();
|
|
}
|
|
|
|
doOpen().then(common.mustCall());
|