Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b23ac8

Browse filesBrowse files
committed
test: fix status when compiled without inspector
PR-URL: #60289 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 17fde3f commit 4b23ac8
Copy full SHA for 4b23ac8

File tree

Expand file treeCollapse file tree

5 files changed

+17
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+17
-3
lines changed
Open diff view settings
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const noop = () => {};
5454
const hasCrypto = Boolean(process.versions.openssl) &&
5555
!process.env.NODE_SKIP_CRYPTO;
5656

57+
const hasInspector = Boolean(process.features.inspector);
5758
const hasSQLite = Boolean(process.versions.sqlite);
5859

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

713714
function skipIfInspectorDisabled() {
714-
if (!process.features.inspector) {
715+
if (!hasInspector) {
715716
skip('V8 inspector is disabled');
716717
}
717718
}
@@ -930,6 +931,7 @@ const common = {
930931
hasIntl,
931932
hasCrypto,
932933
hasQuic,
934+
hasInspector,
933935
hasSQLite,
934936
invalidArgTypeHelper,
935937
isAlive,
Collapse file

‎test/common/index.mjs‎

Copy file name to clipboardExpand all lines: test/common/index.mjs
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const {
1717
getTTYfd,
1818
hasCrypto,
1919
hasQuic,
20+
hasInspector,
2021
hasSQLite,
2122
hasIntl,
2223
hasIPv6,
@@ -68,6 +69,7 @@ export {
6869
getTTYfd,
6970
hasCrypto,
7071
hasQuic,
72+
hasInspector,
7173
hasSQLite,
7274
hasIntl,
7375
hasIPv6,
Collapse file

‎test/common/wpt.js‎

Copy file name to clipboardExpand all lines: test/common/wpt.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ class BuildRequirement {
412412
// Not using common.hasCrypto because of the global leak checks
413413
this.hasCrypto = Boolean(process.versions.openssl) &&
414414
!process.env.NODE_SKIP_CRYPTO;
415+
416+
// Not using common.hasInspector because of the global leak checks
417+
this.hasInspector = Boolean(process.features.inspector);
415418
}
416419

417420
/**
@@ -429,6 +432,9 @@ class BuildRequirement {
429432
if (requires.has('crypto') && !this.hasCrypto) {
430433
return 'crypto';
431434
}
435+
if (requires.has('inspector') && !this.hasInspector) {
436+
return 'inspector';
437+
}
432438
return false;
433439
}
434440
}
Collapse file

‎test/parallel/test-process-get-builtin.mjs‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-get-builtin.mjs
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { hasCrypto, hasIntl, hasSQLite } from '../common/index.mjs';
1+
import { hasCrypto, hasIntl, hasInspector, hasSQLite } from '../common/index.mjs';
22
import assert from 'node:assert';
33
import { builtinModules } from 'node:module';
44
import { isMainThread } from 'node:worker_threads';
@@ -39,6 +39,10 @@ if (!hasIntl) {
3939
// TODO(@jasnell): Remove this once node:quic graduates from unflagged.
4040
publicBuiltins.delete('node:quic');
4141

42+
if (!hasInspector) {
43+
publicBuiltins.delete('inspector');
44+
publicBuiltins.delete('inspector/promises');
45+
}
4246
if (!hasSQLite) {
4347
publicBuiltins.delete('node:sqlite');
4448
}
Collapse file

‎test/wpt/status/console.json‎

Copy file name to clipboardExpand all lines: test/wpt/status/console.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"idlharness.any.js": {
33
"note": "https://github.com/nodejs/node/issues/44185",
4-
"requires": ["crypto", "small-icu"]
4+
"requires": ["crypto", "inspector", "small-icu"]
55
},
66
"idlharness-shadowrealm.window.js": {
77
"skip": "ShadowRealm support is not enabled"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.