Skip to content

Commit 17e26e3

Browse files
committed
test: correct conditional secure heap flags test
1 parent 82fc81c commit 17e26e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/parallel/test-process-env-allowed-flags-are-documented.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ if (!hasOpenSSL3) {
4949
documented.delete('--openssl-shared-config');
5050
}
5151

52+
const isV8Sandboxed = process.config.variables.v8_enable_sandbox;
53+
5254
// Filter out options that are conditionally present.
5355
const conditionalOpts = [
5456
{
@@ -74,7 +76,10 @@ const conditionalOpts = [
7476
}, {
7577
include: process.features.inspector,
7678
filter: (opt) => opt.startsWith('--inspect') || opt === '--debug-port'
77-
},
79+
}, {
80+
include: !isV8Sandboxed,
81+
filter: (opt) => ['--secure-heap', '--secure-heap-min'].includes(opt)
82+
}
7883
];
7984
documented.forEach((opt) => {
8085
conditionalOpts.forEach(({ include, filter }) => {

0 commit comments

Comments
 (0)