Skip to content

Commit

Permalink
test: change the promises to async/await in test-debugger-exec-scope.js
Browse files Browse the repository at this point in the history
PR-URL: #44685
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
Ankita-Khiratkar authored and danielleadams committed Oct 5, 2022
1 parent 3ad0fae commit 4db72a6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 38 deletions.
38 changes: 0 additions & 38 deletions test/sequential/test-debugger-exec-scope.js

This file was deleted.

23 changes: 23 additions & 0 deletions test/sequential/test-debugger-exec-scope.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { skipIfInspectorDisabled } from '../common/index.mjs';

skipIfInspectorDisabled();

import { path } from '../common/fixtures.mjs';
import startCLI from '../common/debugger.js';

import assert from 'assert';

const cli = startCLI([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();
}

0 comments on commit 4db72a6

Please sign in to comment.