Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion test/parallel/test-config-json-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ const assert = require('assert');

// Round-trip through JSON so that the null-prototype objects returned by
// generateConfigJsonSchema() show up as plain objects in the diff.
const schema = JSON.parse(JSON.stringify(generateConfigJsonSchema()));
const schemaString = JSON.stringify(generateConfigJsonSchema());
const schema = JSON.parse(
schemaString.includes('"description":"use bundled CA store"') &&
schemaString.includes('"description":"use OpenSSL\'s default CA store (default)"') ?
// If node was built with --openssl-use-def-ca-store configure flag,
// it affects the values of `use-bundled-ca` and `use-openssl-ca`.
schemaString.replace('"use bundled CA store"', '"use bundled CA store (default)"')
.replace('"use OpenSSL\'s default CA store (default)"', '"use OpenSSL\'s default CA store"') :
schemaString
);

// This assertion ensures that whenever we add a new env option, we also add it
// to the JSON schema. The function getEnvOptionsInputType() returns all the available
Expand Down
Loading