mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00

Namely: async_wrap, crypto, http_parser, signal_wrap, url, and v8. They were runtime-deprecated 4 years ago. PR-URL: https://github.com/nodejs/node/pull/57149 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
24 lines
445 B
JavaScript
24 lines
445 B
JavaScript
const common = require('../../common');
|
|
const { isMainThread } = require('worker_threads');
|
|
|
|
if (!isMainThread) {
|
|
common.skip('This test only works on a main thread');
|
|
}
|
|
|
|
const assert = require('assert');
|
|
|
|
{
|
|
assert.throws(() => {
|
|
process.binding();
|
|
}, common.expectsError({
|
|
code: 'ERR_ACCESS_DENIED',
|
|
}));
|
|
}
|
|
|
|
{
|
|
assert.throws(() => {
|
|
process.binding('fs');
|
|
}, common.expectsError({
|
|
code: 'ERR_ACCESS_DENIED',
|
|
}));
|
|
}
|