summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-access.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-08-06 14:40:30 -0700
committerJames M Snell <jasnell@gmail.com>2018-08-09 13:47:31 -0700
commitc7962dcba46f44b888686e6a76bcc6fef2eb7760 (patch)
tree247db2bcd4f0673adf5ccad86ed7fc58286e7c9b /test/parallel/test-fs-access.js
parent2fd71f92381010724e24cd07d505f76e63b16394 (diff)
downloadandroid-node-v8-c7962dcba46f44b888686e6a76bcc6fef2eb7760.tar.gz
android-node-v8-c7962dcba46f44b888686e6a76bcc6fef2eb7760.tar.bz2
android-node-v8-c7962dcba46f44b888686e6a76bcc6fef2eb7760.zip
src: move process.binding('uv') to internalBinding
PR-URL: https://github.com/nodejs/node/pull/22163 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'test/parallel/test-fs-access.js')
-rw-r--r--test/parallel/test-fs-access.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js
index d053b9323b..02e9356275 100644
--- a/test/parallel/test-fs-access.js
+++ b/test/parallel/test-fs-access.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
// This tests that fs.access and fs.accessSync works as expected
@@ -8,7 +9,8 @@ const assert = require('assert');
const fs = require('fs');
const path = require('path');
-const uv = process.binding('uv');
+const { internalBinding } = require('internal/test/binding');
+const { UV_ENOENT } = internalBinding('uv');
const tmpdir = require('../common/tmpdir');
const doesNotExist = path.join(tmpdir.path, '__this_should_not_exist');
@@ -161,7 +163,7 @@ assert.throws(
);
assert.strictEqual(err.constructor, Error);
assert.strictEqual(err.syscall, 'access');
- assert.strictEqual(err.errno, uv.UV_ENOENT);
+ assert.strictEqual(err.errno, UV_ENOENT);
return true;
}
);
@@ -177,7 +179,7 @@ assert.throws(
);
assert.strictEqual(err.constructor, Error);
assert.strictEqual(err.syscall, 'access');
- assert.strictEqual(err.errno, uv.UV_ENOENT);
+ assert.strictEqual(err.errno, UV_ENOENT);
return true;
}
);