Skip to content

Commit

Permalink
test: see value of "hadError" in tls test
Browse files Browse the repository at this point in the history
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 targos committed Aug 2, 2018
1 parent a40ee21 commit 246a94f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-tls-hello-parser-failure.js
Expand Up @@ -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 246a94f

Please sign in to comment.