Skip to content
Merged
Show file tree
Hide file tree
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
test: change the promises to async/await in test-debugger-exec-scope.js
  • Loading branch information
Ankita-Khiratkar committed Sep 16, 2022
commit 3bab1f0d3b41117485b6b8efd977b6d44805d80d
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();
}