diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 6878b16085f0c3..49594bde6daf1d 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -64,9 +64,7 @@ server.listen(0, function() { default: // Write to a torn down client should RESET or ABORT - assert.strictEqual(er.code, - 'ECONNRESET'); - break; + assert.fail(`Unexpected error code ${er.code}`); }