mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
Has been deprecated for six years. It's time to remove it. PR-URL: https://github.com/nodejs/node/pull/58533 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
19 lines
393 B
JavaScript
19 lines
393 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { throws } = require('assert');
|
|
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const tls = require('tls');
|
|
|
|
// Verify that passing an IP address the the servername option
|
|
// throws an error.
|
|
throws(() => tls.connect({
|
|
port: 1234,
|
|
servername: '127.0.0.1',
|
|
}, common.mustNotCall()), {
|
|
code: 'ERR_INVALID_ARG_VALUE',
|
|
});
|