node/test/parallel/test-debugger-exec-scope.mjs
Antoine du Hamel 0457bfee2c
test: forbid use of named imports for fixtures
PR-URL: https://github.com/nodejs/node/pull/61228
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-01-01 23:48:26 +00:00

23 lines
748 B
JavaScript

import { skipIfInspectorDisabled } from '../common/index.mjs';
skipIfInspectorDisabled();
import * as fixtures from '../common/fixtures.mjs';
import startCLI from '../common/debugger.js';
import assert from 'assert';
const cli = startCLI([fixtures.path('debugger/backtrace.js')]);
try {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.stepCommand('c');
await cli.command('exec .scope');
assert.match(cli.output, /'moduleScoped'/, 'displays closure from module body');
assert.match(cli.output, /'a'/, 'displays local / function arg');
assert.match(cli.output, /'l1'/, 'displays local scope');
assert.doesNotMatch(cli.output, /'encodeURIComponent'/, 'omits global scope');
} finally {
await cli.quit();
}