diff options
author | cjihrig <cjihrig@gmail.com> | 2017-01-19 11:18:51 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-01-23 09:45:58 -0500 |
commit | aa0e4f38433cf2ca62fbb736c727cd65c99a96db (patch) | |
tree | f00b3c3027451f5aabf91aa9502b8bd450475cb4 /test/parallel/test-http-conn-reset.js | |
parent | a647d82f83ad5ddad5db7be2cc24c3d686121792 (diff) | |
download | android-node-v8-aa0e4f38433cf2ca62fbb736c727cd65c99a96db.tar.gz android-node-v8-aa0e4f38433cf2ca62fbb736c727cd65c99a96db.tar.bz2 android-node-v8-aa0e4f38433cf2ca62fbb736c727cd65c99a96db.zip |
test: use common.fail() instead of assert(false)
PR-URL: https://github.com/nodejs/node/pull/10899
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-http-conn-reset.js')
-rw-r--r-- | test/parallel/test-http-conn-reset.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/parallel/test-http-conn-reset.js b/test/parallel/test-http-conn-reset.js index ae04c41aff..161e0e5c2b 100644 --- a/test/parallel/test-http-conn-reset.js +++ b/test/parallel/test-http-conn-reset.js @@ -19,9 +19,7 @@ server.listen(0, options.host, common.mustCall(onListen)); // do a GET request, expect it to fail function onListen() { options.port = this.address().port; - const req = http.request(options, function(res) { - assert.ok(false, 'this should never run'); - }); + const req = http.request(options, common.fail); req.on('error', common.mustCall(function(err) { assert.strictEqual(err.code, 'ECONNRESET'); })); |