From 14b3f866c2cf29d47919265cee742d917d6dd146 Mon Sep 17 00:00:00 2001 From: Brinda Ashar Date: Fri, 16 Sep 2022 20:28:50 -0400 Subject: [PATCH] test: change promises to async/await in test-debugger-heap-profiler --- test/sequential/test-debugger-heap-profiler.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sequential/test-debugger-heap-profiler.js b/test/sequential/test-debugger-heap-profiler.js index c4f666afab79e9..b38b43ea843c50 100644 --- a/test/sequential/test-debugger-heap-profiler.js +++ b/test/sequential/test-debugger-heap-profiler.js @@ -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(); @@ -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();