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: nodejs#22069
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
oryanmoshe authored and Trott committed Aug 2, 2018
1 parent d2ffcac commit 90972d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-tls-hello-parser-failure.js
Original file line number Diff line number Diff line change
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 90972d5

Please sign in to comment.