summaryrefslogtreecommitdiff
path: root/test/sequential/test-async-wrap-getasyncid.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-01-21 10:21:25 -0800
committerJames M Snell <jasnell@gmail.com>2018-02-05 20:31:04 -0800
commit329fc78e4919231bf76771797878f7b0db0f73ac (patch)
treecaa109f2904badc5a671abfb1f0f951ac62e6674 /test/sequential/test-async-wrap-getasyncid.js
parent85b37db68465c0947dca78749e8fc01926e3cdfe (diff)
downloadandroid-node-v8-329fc78e4919231bf76771797878f7b0db0f73ac.tar.gz
android-node-v8-329fc78e4919231bf76771797878f7b0db0f73ac.tar.bz2
android-node-v8-329fc78e4919231bf76771797878f7b0db0f73ac.zip
fs: add initial set of fs.promises APIs
Initial set of fs.promises APIs with documentation and one benchmark. PR-URL: https://github.com/nodejs/node/pull/18297 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/sequential/test-async-wrap-getasyncid.js')
-rw-r--r--test/sequential/test-async-wrap-getasyncid.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js
index 86a4065fb2..fb11f2d9e4 100644
--- a/test/sequential/test-async-wrap-getasyncid.js
+++ b/test/sequential/test-async-wrap-getasyncid.js
@@ -9,6 +9,8 @@ const fixtures = require('../common/fixtures');
const tmpdir = require('../common/tmpdir');
const { getSystemErrorName } = require('util');
+common.crashOnUnhandledRejection();
+
// Make sure that all Providers are tested.
{
const hooks = require('async_hooks').createHook({
@@ -167,6 +169,14 @@ if (common.hasCrypto) { // eslint-disable-line crypto-check
testInitialized(new Signal(), 'Signal');
}
+{
+ async function openTest() {
+ const fd = await fs.promises.open(__filename, 'r');
+ testInitialized(fd, 'FileHandle');
+ await fd.close();
+ }
+ openTest().then(common.mustCall()).catch(common.mustNotCall());
+}
{
const binding = process.binding('stream_wrap');