2017-05-02 20:36:50 +03:00
|
|
|
'use strict';
|
|
|
|
|
2020-10-03 13:01:57 -07:00
|
|
|
// Issue: https://github.com/nodejs/node/issues/3655
|
|
|
|
// Test checks if we get exception instead of runtime error
|
2017-05-02 20:36:50 +03:00
|
|
|
|
2017-05-15 20:39:52 +02:00
|
|
|
const common = require('../common');
|
2017-07-01 02:29:09 +03:00
|
|
|
if (!common.hasCrypto)
|
2017-05-15 20:39:52 +02:00
|
|
|
common.skip('missing crypto');
|
2017-07-01 02:29:09 +03:00
|
|
|
|
2017-05-02 20:36:50 +03:00
|
|
|
const assert = require('assert');
|
|
|
|
|
|
|
|
const TlsSocket = require('tls').TLSSocket;
|
|
|
|
const EventEmitter = require('events').EventEmitter;
|
|
|
|
assert.throws(
|
|
|
|
() => { new TlsSocket(new EventEmitter()); },
|
2018-03-07 20:08:17 -08:00
|
|
|
TypeError
|
2017-05-02 20:36:50 +03:00
|
|
|
);
|