diff --git a/test/common/README.md b/test/common/README.md index dcccb77f63f92c..d43b0ebbff39af 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -570,6 +570,10 @@ If set, `NODE_COMMON_PORT`'s value overrides the `common.PORT` default value of If set, command line arguments passed to individual tests are not validated. +### `NODE_SKIP_CRYPTO` + +If set, crypto tests are skipped. + ### `NODE_TEST_KNOWN_GLOBALS` A comma-separated list of variables names that are appended to the global diff --git a/test/common/index.js b/test/common/index.js index a231c45e1eb525..300ea60377876b 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -48,7 +48,8 @@ if (isMainThread) const noop = () => {}; -const hasCrypto = Boolean(process.versions.openssl); +const hasCrypto = Boolean(process.versions.openssl) && + !process.env.NODE_SKIP_CRYPTO; // Check for flags. Skip this for workers (both, the `cluster` module and // `worker_threads`) and child processes.