mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 16:22:29 +00:00

PR-URL: https://github.com/nodejs/node/pull/16158 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
20 lines
468 B
JavaScript
20 lines
468 B
JavaScript
'use strict';
|
|
|
|
/*
|
|
* Issue: https://github.com/nodejs/node/issues/3655
|
|
* Test checks if we get exception instead of runtime error
|
|
*/
|
|
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
|
|
const TlsSocket = require('tls').TLSSocket;
|
|
const EventEmitter = require('events').EventEmitter;
|
|
assert.throws(
|
|
() => { new TlsSocket(new EventEmitter()); },
|
|
/^TypeError: (.+) is not a function$/
|
|
);
|