Skip to content

Commit e428a2e

Browse files
committed
fixup!
1 parent 8dce911 commit e428a2e

7 files changed

Lines changed: 96 additions & 109 deletions

src/inspector_js_api.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ class JSBindingsConnection : public BaseObject {
213213
if (session->session_) {
214214
session->session_->Dispatch(
215215
ToInspectorString(info.GetIsolate(), info[0])->string());
216+
info.GetIsolate()->PerformMicrotaskCheckpoint();
216217
}
217218
}
218219

test/parallel/test-repl-history-navigation.js

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ const ESCAPE = { name: 'escape', meta: true };
6868
const prompt = '> ';
6969
const WAIT = '€';
7070

71-
const prev = process.features.inspector;
72-
7371
let completions = 0;
7472

7573
const tests = [
@@ -89,26 +87,26 @@ const tests = [
8987
test: [UP, UP, UP, UP, UP, UP, DOWN, DOWN, DOWN, DOWN, DOWN, DOWN],
9088
expected: [prompt,
9189
`${prompt}Array(100).fill(1).map((e, i) => i ** 2)`,
92-
prev && '\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
90+
'\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
9391
'144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529,' +
9492
' 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, ' +
9593
'1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936,' +
9694
' 2025, 2116, 2209,...',
9795
`${prompt}{key : {key2 :[] }}`,
98-
prev && '\n// { key: { key2: [] } }',
96+
'\n// { key: { key2: [] } }',
9997
`${prompt}let autocompleteMe = 123`,
10098
`${prompt}555 + 909`,
101-
prev && '\n// 1464',
99+
'\n// 1464',
102100
`${prompt}let ab = 45`,
103101
prompt,
104102
`${prompt}let ab = 45`,
105103
`${prompt}555 + 909`,
106-
prev && '\n// 1464',
104+
'\n// 1464',
107105
`${prompt}let autocompleteMe = 123`,
108106
`${prompt}{key : {key2 :[] }}`,
109-
prev && '\n// { key: { key2: [] } }',
107+
'\n// { key: { key2: [] } }',
110108
`${prompt}Array(100).fill(1).map((e, i) => i ** 2)`,
111-
prev && '\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
109+
'\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
112110
'144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529,' +
113111
' 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, ' +
114112
'1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936,' +
@@ -163,7 +161,6 @@ const tests = [
163161
},
164162
{
165163
env: { NODE_REPL_HISTORY: defaultHistoryPath },
166-
skip: !process.features.inspector,
167164
test: [
168165
// あ is a full width character with a length of one.
169166
// 🐕 is a full width character with a length of two.
@@ -206,7 +203,6 @@ const tests = [
206203
columns: 250,
207204
checkTotal: true,
208205
showEscapeCodes: true,
209-
skip: !process.features.inspector,
210206
test: [
211207
UP,
212208
UP,
@@ -330,7 +326,6 @@ const tests = [
330326
{
331327
env: { NODE_REPL_HISTORY: defaultHistoryPath },
332328
showEscapeCodes: true,
333-
skip: !process.features.inspector,
334329
checkTotal: true,
335330
test: [
336331
'au',
@@ -453,7 +448,6 @@ const tests = [
453448
{
454449
// Check changed inspection defaults.
455450
env: { NODE_REPL_HISTORY: defaultHistoryPath },
456-
skip: !process.features.inspector,
457451
test: [
458452
'util.inspect.replDefaults.showHidden',
459453
ENTER,
@@ -463,7 +457,6 @@ const tests = [
463457
},
464458
{
465459
env: { NODE_REPL_HISTORY: defaultHistoryPath },
466-
skip: !process.features.inspector,
467460
checkTotal: true,
468461
test: [
469462
'[ ]',
@@ -504,7 +497,6 @@ const tests = [
504497
callback(null, [[' Always visible'], line]);
505498
}
506499
},
507-
skip: !process.features.inspector,
508500
test: [
509501
WAIT, // The first call is awaited before new input is triggered!
510502
BACKSPACE,
@@ -587,8 +579,9 @@ const tests = [
587579
expected: [
588580
prompt, ...'const util = {}',
589581
'undefined\n',
590-
prompt, ...'ut', ...(prev ? [' // il', '\n// {}',
591-
'il', '\n// {}'] : ['il']),
582+
prompt, ...'ut',
583+
' // il', '\n// {}',
584+
'il', '\n// {}',
592585
'{}\n',
593586
prompt,
594587
],
@@ -608,7 +601,8 @@ const tests = [
608601
'undefined\n',
609602
prompt, ...'globalThis.util = {}',
610603
'{}\n',
611-
prompt, ...'ut', ...(prev ? [' // il', 'il' ] : ['il']),
604+
prompt, ...'ut',
605+
' // il', 'il',
612606
'{}\n',
613607
prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)',
614608
'true\n',
@@ -619,7 +613,6 @@ const tests = [
619613
{
620614
// Test that preview should not be removed when pressing ESCAPE key
621615
env: { NODE_REPL_HISTORY: defaultHistoryPath },
622-
skip: !process.features.inspector,
623616
test: [
624617
'1+1',
625618
ESCAPE,
@@ -637,7 +630,6 @@ const tests = [
637630
{
638631
// Test that the multiline history is correctly navigated and it can be edited
639632
env: { NODE_REPL_HISTORY: defaultHistoryPath },
640-
skip: !process.features.inspector,
641633
test: [
642634
'let a = ``',
643635
ENTER,
@@ -682,7 +674,6 @@ const tests = [
682674
// Test that the previous multiline history can only be accessed going through the entirety of the current
683675
// One navigating its all lines first.
684676
env: { NODE_REPL_HISTORY: defaultHistoryPath },
685-
skip: !process.features.inspector,
686677
test: [
687678
'let b = ``',
688679
ENTER,
@@ -742,7 +733,6 @@ const tests = [
742733
{
743734
// Test that we can recover from a line with a syntax error
744735
env: { NODE_REPL_HISTORY: defaultHistoryPath },
745-
skip: !process.features.inspector,
746736
test: [
747737
'let d = ``',
748738
ENTER,
@@ -793,7 +783,6 @@ const tests = [
793783
{
794784
// Test that multiline history is not duplicated
795785
env: { NODE_REPL_HISTORY: defaultHistoryPath },
796-
skip: !process.features.inspector,
797786
test: [
798787
"let f = ''",
799788
ENTER,
@@ -851,13 +840,8 @@ function runTest() {
851840
const opts = tests.shift();
852841
if (!opts) return; // All done
853842

854-
const { expected, skip } = opts;
843+
const { expected } = opts;
855844

856-
// Test unsupported on platform.
857-
if (skip) {
858-
setImmediate(runTestWrap, true);
859-
return;
860-
}
861845
const lastChunks = [];
862846
let i = 0;
863847

test/parallel/test-repl-mode.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ async function testStrictMode() {
4343
}
4444

4545
async function testStrictModeTerminal() {
46-
if (!process.features.inspector) {
47-
console.warn('Test skipped: V8 inspector is disabled');
48-
return;
49-
}
5046
// Verify that ReferenceErrors are reported in strict mode previews.
5147
const { run, output } = startNewREPLServer({ replMode: repl.REPL_MODE_STRICT, prompt: '> ' });
5248

test/parallel/test-repl-reverse-search.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ const tests = [
192192
{
193193
env: { NODE_REPL_HISTORY: defaultHistoryPath },
194194
showEscapeCodes: true,
195-
skip: !process.features.inspector,
196195
checkTotal: true,
197196
useColors: false,
198197
test: [
@@ -289,13 +288,7 @@ function runTest() {
289288
const opts = tests.shift();
290289
if (!opts) return; // All done
291290

292-
const { expected, skip } = opts;
293-
294-
// Test unsupported on platform.
295-
if (skip) {
296-
setImmediate(runTestWrap, true);
297-
return;
298-
}
291+
const { expected } = opts;
299292

300293
const lastChunks = [];
301294
let i = 0;

0 commit comments

Comments
 (0)