summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-access.js
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2017-05-11 18:52:20 +0300
committerMyles Borins <mylesborins@google.com>2017-05-20 10:21:34 -0400
commit8250bfd1e5188d5dada58aedf7a991e959d5eaa9 (patch)
tree3fd01220deeb17bb66f490bc4be2463ef1cfe8d2 /test/parallel/test-fs-access.js
parentc60a7fa7383a983a0348e8876fdd84b04c353436 (diff)
downloadandroid-node-v8-8250bfd1e5188d5dada58aedf7a991e959d5eaa9.tar.gz
android-node-v8-8250bfd1e5188d5dada58aedf7a991e959d5eaa9.tar.bz2
android-node-v8-8250bfd1e5188d5dada58aedf7a991e959d5eaa9.zip
fs: Revert throw on invalid callbacks
This reverts 4cb5f3daa350421e4eb4622dc818633d3a0659b3 Based on community feedback I think we should consider reverting this change. We should explore how this could be solved via linting rules. Refs: https://github.com/nodejs/node/pull/12562 PR-URL: https://github.com/nodejs/node/pull/12976 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-fs-access.js')
-rw-r--r--test/parallel/test-fs-access.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js
index 9ea29c7141..f378824cbc 100644
--- a/test/parallel/test-fs-access.js
+++ b/test/parallel/test-fs-access.js
@@ -87,11 +87,11 @@ assert.throws(() => {
assert.throws(() => {
fs.access(__filename, fs.F_OK);
-}, common.expectsError({code: 'ERR_INVALID_CALLBACK'}));
+}, /^TypeError: "callback" argument must be a function$/);
assert.throws(() => {
fs.access(__filename, fs.F_OK, {});
-}, common.expectsError({code: 'ERR_INVALID_CALLBACK'}));
+}, /^TypeError: "callback" argument must be a function$/);
assert.doesNotThrow(() => {
fs.accessSync(__filename);