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