Skip to content
Merged
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
25 changes: 14 additions & 11 deletions test/sequential/test-debugger-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@ function delay(ms) {
throw error;
}

return cli.waitForInitialBreak()
.then(() => cli.waitForPrompt())
.then(() => cli.command('exec console.profile()'))
.then(() => {
try {
(async () => {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('exec console.profile()');
assert.match(cli.output, /undefined/);
})
.then(() => cli.command('exec console.profileEnd()'))
.then(() => delay(250))
.then(() => {
await cli.command('exec console.profileEnd()');
await delay(250);
assert.match(cli.output, /undefined/);
assert.match(cli.output, /Captured new CPU profile\./);
})
.then(() => cli.quit())
.then(null, onFatal);
await cli.quit();
})()
.then(common.mustCall());
} catch (error) {
return onFatal(error);
}

}