• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3/*
4 * Issue: https://github.com/nodejs/node/issues/3655
5 * Test checks if we get exception instead of runtime error
6 */
7
8const common = require('../common');
9if (!common.hasCrypto)
10  common.skip('missing crypto');
11
12const assert = require('assert');
13
14const TlsSocket = require('tls').TLSSocket;
15const EventEmitter = require('events').EventEmitter;
16assert.throws(
17  () => { new TlsSocket(new EventEmitter()); },
18  TypeError
19);
20