11cb0ef41Sopenharmony_ciimport { skipIfInspectorDisabled } from '../common/index.mjs'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciskipIfInspectorDisabled(); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciimport { path } from '../common/fixtures.mjs'; 61cb0ef41Sopenharmony_ciimport startCLI from '../common/debugger.js'; 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciimport assert from 'assert'; 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst cli = startCLI(['--port=0', path('debugger/backtrace.js')]); 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_citry { 131cb0ef41Sopenharmony_ci await cli.waitForInitialBreak(); 141cb0ef41Sopenharmony_ci await cli.waitForPrompt(); 151cb0ef41Sopenharmony_ci await cli.stepCommand('c'); 161cb0ef41Sopenharmony_ci await cli.command('exec .scope'); 171cb0ef41Sopenharmony_ci assert.match(cli.output, /'moduleScoped'/, 'displays closure from module body'); 181cb0ef41Sopenharmony_ci assert.match(cli.output, /'a'/, 'displays local / function arg'); 191cb0ef41Sopenharmony_ci assert.match(cli.output, /'l1'/, 'displays local scope'); 201cb0ef41Sopenharmony_ci assert.doesNotMatch(cli.output, /'encodeURIComponent'/, 'omits global scope'); 211cb0ef41Sopenharmony_ci} finally { 221cb0ef41Sopenharmony_ci await cli.quit(); 231cb0ef41Sopenharmony_ci} 24