Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fixup!
Signed-off-by: avivkeller <me@aviv.sh>
  • Loading branch information
avivkeller committed Jun 22, 2026
commit 69180428135775943e94a0a1387aad64191280ad
1 change: 1 addition & 0 deletions src/inspector_js_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class JSBindingsConnection : public BaseObject {
if (session->session_) {
session->session_->Dispatch(
ToInspectorString(info.GetIsolate(), info[0])->string());
info.GetIsolate()->PerformMicrotaskCheckpoint();
}
}

Expand Down
40 changes: 12 additions & 28 deletions test/parallel/test-repl-history-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ const ESCAPE = { name: 'escape', meta: true };
const prompt = '> ';
const WAIT = '€';

const prev = process.features.inspector;

let completions = 0;

const tests = [
Expand All @@ -89,26 +87,26 @@ const tests = [
test: [UP, UP, UP, UP, UP, UP, DOWN, DOWN, DOWN, DOWN, DOWN, DOWN],
expected: [prompt,
`${prompt}Array(100).fill(1).map((e, i) => i ** 2)`,
prev && '\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
'\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
'144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529,' +
' 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, ' +
'1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936,' +
' 2025, 2116, 2209,...',
`${prompt}{key : {key2 :[] }}`,
prev && '\n// { key: { key2: [] } }',
'\n// { key: { key2: [] } }',
`${prompt}let autocompleteMe = 123`,
`${prompt}555 + 909`,
prev && '\n// 1464',
'\n// 1464',
`${prompt}let ab = 45`,
prompt,
`${prompt}let ab = 45`,
`${prompt}555 + 909`,
prev && '\n// 1464',
'\n// 1464',
`${prompt}let autocompleteMe = 123`,
`${prompt}{key : {key2 :[] }}`,
prev && '\n// { key: { key2: [] } }',
'\n// { key: { key2: [] } }',
`${prompt}Array(100).fill(1).map((e, i) => i ** 2)`,
prev && '\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
'\n// [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, ' +
'144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529,' +
' 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, ' +
'1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936,' +
Expand Down Expand Up @@ -163,7 +161,6 @@ const tests = [
},
{
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
// あ is a full width character with a length of one.
// 🐕 is a full width character with a length of two.
Expand Down Expand Up @@ -206,7 +203,6 @@ const tests = [
columns: 250,
checkTotal: true,
showEscapeCodes: true,
skip: !process.features.inspector,
test: [
UP,
UP,
Expand Down Expand Up @@ -330,7 +326,6 @@ const tests = [
{
env: { NODE_REPL_HISTORY: defaultHistoryPath },
showEscapeCodes: true,
skip: !process.features.inspector,
checkTotal: true,
test: [
'au',
Expand Down Expand Up @@ -453,7 +448,6 @@ const tests = [
{
// Check changed inspection defaults.
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
'util.inspect.replDefaults.showHidden',
ENTER,
Expand All @@ -463,7 +457,6 @@ const tests = [
},
{
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
checkTotal: true,
test: [
'[ ]',
Expand Down Expand Up @@ -504,7 +497,6 @@ const tests = [
callback(null, [[' Always visible'], line]);
}
},
skip: !process.features.inspector,
test: [
WAIT, // The first call is awaited before new input is triggered!
BACKSPACE,
Expand Down Expand Up @@ -587,8 +579,9 @@ const tests = [
expected: [
prompt, ...'const util = {}',
'undefined\n',
prompt, ...'ut', ...(prev ? [' // il', '\n// {}',
'il', '\n// {}'] : ['il']),
prompt, ...'ut',
' // il', '\n// {}',
'il', '\n// {}',
'{}\n',
prompt,
],
Expand All @@ -608,7 +601,8 @@ const tests = [
'undefined\n',
prompt, ...'globalThis.util = {}',
'{}\n',
prompt, ...'ut', ...(prev ? [' // il', 'il' ] : ['il']),
prompt, ...'ut',
' // il', 'il',
'{}\n',
prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)',
'true\n',
Expand All @@ -619,7 +613,6 @@ const tests = [
{
// Test that preview should not be removed when pressing ESCAPE key
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
'1+1',
ESCAPE,
Expand All @@ -637,7 +630,6 @@ const tests = [
{
// Test that the multiline history is correctly navigated and it can be edited
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
'let a = ``',
ENTER,
Expand Down Expand Up @@ -682,7 +674,6 @@ const tests = [
// Test that the previous multiline history can only be accessed going through the entirety of the current
// One navigating its all lines first.
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
'let b = ``',
ENTER,
Expand Down Expand Up @@ -742,7 +733,6 @@ const tests = [
{
// Test that we can recover from a line with a syntax error
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
'let d = ``',
ENTER,
Expand Down Expand Up @@ -793,7 +783,6 @@ const tests = [
{
// Test that multiline history is not duplicated
env: { NODE_REPL_HISTORY: defaultHistoryPath },
skip: !process.features.inspector,
test: [
"let f = ''",
ENTER,
Expand Down Expand Up @@ -851,13 +840,8 @@ function runTest() {
const opts = tests.shift();
if (!opts) return; // All done

const { expected, skip } = opts;
const { expected } = opts;

// Test unsupported on platform.
if (skip) {
setImmediate(runTestWrap, true);
return;
}
const lastChunks = [];
let i = 0;

Expand Down
4 changes: 0 additions & 4 deletions test/parallel/test-repl-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ async function testStrictMode() {
}

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

Expand Down
9 changes: 1 addition & 8 deletions test/parallel/test-repl-reverse-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ const tests = [
{
env: { NODE_REPL_HISTORY: defaultHistoryPath },
showEscapeCodes: true,
skip: !process.features.inspector,
checkTotal: true,
useColors: false,
test: [
Expand Down Expand Up @@ -289,13 +288,7 @@ function runTest() {
const opts = tests.shift();
if (!opts) return; // All done

const { expected, skip } = opts;

// Test unsupported on platform.
if (skip) {
setImmediate(runTestWrap, true);
return;
}
const { expected } = opts;

const lastChunks = [];
let i = 0;
Expand Down
Loading
Loading