Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const noop = () => {};
const hasCrypto = Boolean(process.versions.openssl) &&
!process.env.NODE_SKIP_CRYPTO;

const hasInspector = Boolean(process.features.inspector);
const hasSQLite = Boolean(process.versions.sqlite);

const hasQuic = hasCrypto && !!process.features.quic;
Expand Down Expand Up @@ -711,7 +712,7 @@ function expectsError(validator, exact) {
}

function skipIfInspectorDisabled() {
if (!process.features.inspector) {
if (!hasInspector) {
skip('V8 inspector is disabled');
}
}
Expand Down Expand Up @@ -930,6 +931,7 @@ const common = {
hasIntl,
hasCrypto,
hasQuic,
hasInspector,
hasSQLite,
invalidArgTypeHelper,
isAlive,
Expand Down
2 changes: 2 additions & 0 deletions test/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const {
getTTYfd,
hasCrypto,
hasQuic,
hasInspector,
hasSQLite,
hasIntl,
hasIPv6,
Expand Down Expand Up @@ -68,6 +69,7 @@ export {
getTTYfd,
hasCrypto,
hasQuic,
hasInspector,
hasSQLite,
hasIntl,
hasIPv6,
Expand Down
6 changes: 6 additions & 0 deletions test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ class BuildRequirement {
// Not using common.hasCrypto because of the global leak checks
this.hasCrypto = Boolean(process.versions.openssl) &&
!process.env.NODE_SKIP_CRYPTO;

// Not using common.hasInspector because of the global leak checks
this.hasInspector = Boolean(process.features.inspector);
}

/**
Expand All @@ -429,6 +432,9 @@ class BuildRequirement {
if (requires.has('crypto') && !this.hasCrypto) {
return 'crypto';
}
if (requires.has('inspector') && !this.hasInspector) {
return 'inspector';
}
return false;
}
}
Expand Down
6 changes: 5 additions & 1 deletion test/parallel/test-process-get-builtin.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { hasCrypto, hasIntl, hasSQLite } from '../common/index.mjs';
import { hasCrypto, hasIntl, hasInspector, hasSQLite } from '../common/index.mjs';
import assert from 'node:assert';
import { builtinModules } from 'node:module';
import { isMainThread } from 'node:worker_threads';
Expand Down Expand Up @@ -39,6 +39,10 @@ if (!hasIntl) {
// TODO(@jasnell): Remove this once node:quic graduates from unflagged.
publicBuiltins.delete('node:quic');

if (!hasInspector) {
publicBuiltins.delete('inspector');
publicBuiltins.delete('inspector/promises');
}
if (!hasSQLite) {
publicBuiltins.delete('node:sqlite');
}
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/status/console.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"idlharness.any.js": {
"note": "https://github.com/nodejs/node/issues/44185",
"requires": ["crypto", "small-icu"]
"requires": ["crypto", "inspector", "small-icu"]
},
"idlharness-shadowrealm.window.js": {
"skip": "ShadowRealm support is not enabled"
Expand Down
Loading