Skip to content
Permalink
Browse files

test: see value of "hadError" in tls test

The existing implementation created a state that if the assert failed
we got an error message without the values of hadError.
Removed the default error message and added a comment explaining the
assert.

PR-URL: #22069
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information...
oryanmoshe authored and Trott committed Aug 1, 2018
1 parent d2ffcac commit 90972d5cb6477adfa907f2a8e4326908ef93c7ef
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/parallel/test-tls-hello-parser-failure.js
@@ -60,6 +60,7 @@ const server = tls.createServer(options, function(c) {
}));

client.on('close', common.mustCall(function(hadError) {
assert.strictEqual(hadError, true, 'Client never errored');
// Confirm that client errored
assert.strictEqual(hadError, true);
}));
}));

0 comments on commit 90972d5

Please sign in to comment.
You can’t perform that action at this time.