mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 21:35:34 +00:00

PR-URL: https://github.com/nodejs/node/pull/57361 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
17 lines
452 B
JavaScript
17 lines
452 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
// Ensure accessing ._external doesn't hit an assert in the accessor method.
|
|
{
|
|
const pctx = tls.createSecureContext().context;
|
|
const cctx = { __proto__: pctx };
|
|
assert.throws(() => cctx._external, TypeError);
|
|
pctx._external; // eslint-disable-line no-unused-expressions
|
|
}
|