summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-append-file.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-02-09 00:54:31 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-26 23:18:12 +0000
commite9f2cecf1a14285574f9b6104dd690ef92495d74 (patch)
tree6160626254f229aceff338614f71a2091a55e485 /test/parallel/test-fs-append-file.js
parent009e41826f47c595ca994f673023f9380198be36 (diff)
downloadandroid-node-v8-e9f2cecf1a14285574f9b6104dd690ef92495d74.tar.gz
android-node-v8-e9f2cecf1a14285574f9b6104dd690ef92495d74.tar.bz2
android-node-v8-e9f2cecf1a14285574f9b6104dd690ef92495d74.zip
Revert "fs: Revert throw on invalid callbacks"
This reverts commit 8250bfd1e5188d5dada58aedf7a991e959d5eaa9. PR-URL: https://github.com/nodejs/node/pull/18668 Refs: https://github.com/nodejs/node/pull/12562 Refs: https://github.com/nodejs/node/pull/12976 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'test/parallel/test-fs-append-file.js')
-rw-r--r--test/parallel/test-fs-append-file.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/parallel/test-fs-append-file.js b/test/parallel/test-fs-append-file.js
index 8e9a0619b0..29ae1b2f3b 100644
--- a/test/parallel/test-fs-append-file.js
+++ b/test/parallel/test-fs-append-file.js
@@ -146,12 +146,9 @@ fs.open(filename5, 'a+', function(e, fd) {
});
});
-// test that a missing callback emits a warning, even if the last argument is a
-// function.
-const filename6 = join(tmpdir.path, 'append6.txt');
-const warn = 'Calling an asynchronous function without callback is deprecated.';
-common.expectWarning('DeprecationWarning', warn);
-fs.appendFile(filename6, console.log);
+assert.throws(
+ () => fs.appendFile(join(tmpdir.path, 'append6.txt'), console.log),
+ { code: 'ERR_INVALID_CALLBACK' });
process.on('exit', function() {
assert.strictEqual(12, ncallbacks);