diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js index 0a6034f746784d..a60f6bbecf69cf 100644 --- a/test/parallel/test-process-env-allowed-flags-are-documented.js +++ b/test/parallel/test-process-env-allowed-flags-are-documented.js @@ -46,7 +46,14 @@ const conditionalOpts = [ return ['--openssl-config', '--tls-cipher-list', '--use-bundled-ca', '--use-openssl-ca' ].includes(opt); } }, - { include: common.hasFipsCrypto, + { + // We are using openssl_is_fips from the configuration because it could be + // the case that OpenSSL is FIPS compatible but fips has not been enabled + // (starting node with --enable-fips). If we use common.hasFipsCrypto + // that would only tells us if fips has been enabled, but in this case we + // want to check options which will be available regardless of whether fips + // is enabled at runtime or not. + include: process.config.variables.openssl_is_fips, filter: (opt) => opt.includes('-fips') }, { include: common.hasIntl, filter: (opt) => opt === '--icu-data-dir' },