11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci// Issue: https://github.com/nodejs/node/issues/3655 41cb0ef41Sopenharmony_ci// Test checks if we get exception instead of runtime error 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciconst common = require('../common'); 71cb0ef41Sopenharmony_ciif (!common.hasCrypto) 81cb0ef41Sopenharmony_ci common.skip('missing crypto'); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst assert = require('assert'); 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ciconst TlsSocket = require('tls').TLSSocket; 131cb0ef41Sopenharmony_ciconst EventEmitter = require('events').EventEmitter; 141cb0ef41Sopenharmony_ciassert.throws( 151cb0ef41Sopenharmony_ci () => { new TlsSocket(new EventEmitter()); }, 161cb0ef41Sopenharmony_ci TypeError 171cb0ef41Sopenharmony_ci); 18