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
12 changes: 5 additions & 7 deletions test/parallel/test-debugger-extract-function-name.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import startCLI from '../common/debugger.js';

import assert from 'assert';

const env = {
...process.env,
NODE_INSPECT_RESUME_ON_START: '1',
};
const cli = startCLI(
[fixtures.path('debugger', 'alive.js')], [], { env });
// Evaluating while the target is running can trigger a V8 scope assertion.
// Keep it paused for these formatting checks.
const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]);

try {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('exec a = function func() {}; a;');
assert.match(cli.output, /\[Function: func\]/);
Expand All @@ -33,5 +31,5 @@ try {
await cli.command('exec a = function * func() {}; a;');
assert.match(cli.output, /\[GeneratorFunction\]/);
} finally {
cli.quit();
await cli.quit();
}
Loading