mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 17:32:22 +00:00

In test-tls-wrap-event-emitter, the text of a TypeError is checked as part of the test. However, this text is generated by the JavaScript engine (V8) and not Node.js. Thus, we should not check the text as JS engine error messages can change without it being considered a breaking change for Node.js. A side effect is that node-chakracore will no longer need to patch this test to pass. PR-URL: https://github.com/nodejs/node/pull/19215 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
20 lines
440 B
JavaScript
20 lines
440 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
|
|
);
|