Skip to content

Commit

Permalink
test: change indexOf to includes in ecdh-disable
Browse files Browse the repository at this point in the history
Updates test/parallel/test-tls-ecdh-disable.js on line 34 so that
assert.notEqual is changed to just assert. Then in place of indexOf,
includes() is used. The callback on line 31 has been wrapped in
common.mustCall() in order to ensure that this callback is only
made one time.
  • Loading branch information
Aaron Williams committed Dec 1, 2016
1 parent 8264a22 commit 4b083b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-tls-ecdh-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ server.listen(0, '127.0.0.1', function() {
if (common.isWindows)
cmd += ' -no_rand_screen';

exec(cmd, function(err, stdout, stderr) {
exec(cmd, common.mustCall(function(err, stdout, stderr) {
// Old versions of openssl will still exit with 0 so we
// can't just check if err is not null.
assert.notEqual(stderr.indexOf('handshake failure'), -1);
assert(stderr.includes('handshake failure'));
server.close();
});
}));
});

0 comments on commit 4b083b7

Please sign in to comment.