node/test/parallel/test-tls-wrap-event-emmiter.js
Rich Trott f593f9e9ef test: adjust comments for upcoming lint rule
Enforce `//` for multiline comments. Some tests mixed and matched, and
at least one did so in a (to me) surprising way.

PR-URL: https://github.com/nodejs/node/pull/35485
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-10-07 04:36:02 -07:00

18 lines
433 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
);