Skip to content

Commit

Permalink
test: change promises to async/await in test-debugger-heap-profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
brindashar4 committed Sep 17, 2022
1 parent ab7175a commit 14b3f86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sequential/test-debugger-heap-profiler.js
Expand Up @@ -19,7 +19,7 @@ const filename = path.join(tmpdir.path, 'node.heapsnapshot');
const opts = { cwd: tmpdir.path };
const cli = startCLI([fixtures.path('debugger/empty.js')], [], opts);

let waitInitialBreak = async function () {
const waitInitialBreak = async function() {
try {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
Expand All @@ -30,9 +30,9 @@ const filename = path.join(tmpdir.path, 'node.heapsnapshot');
await cli.command('takeHeapSnapshot(); takeHeapSnapshot()');
await JSON.parse(readFileSync(filename, 'utf8'));
} finally {
await cli.quit()
}
}
await cli.quit();
}
};

// Check that the snapshot is valid JSON.
return waitInitialBreak();
Expand Down

0 comments on commit 14b3f86

Please sign in to comment.