| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,18 +21,21 @@ function delay(ms) { | |||
| 21 | 21 | throw error; | |
| 22 | 22 | } | |
| 23 | 23 | ||
| 24 | - return cli.waitForInitialBreak() | ||
| 25 | - .then(() => cli.waitForPrompt()) | ||
| 26 | - .then(() => cli.command('exec console.profile()')) | ||
| 27 | - .then(() => { | ||
| 24 | + try { | ||
| 25 | + (async () => { | ||
| 26 | + await cli.waitForInitialBreak(); | ||
| 27 | + await cli.waitForPrompt(); | ||
| 28 | + await cli.command('exec console.profile()'); | ||
| 28 | 29 | assert.match(cli.output, /undefined/); | |
| 29 | - }) | ||
| 30 | - .then(() => cli.command('exec console.profileEnd()')) | ||
| 31 | - .then(() => delay(250)) | ||
| 32 | - .then(() => { | ||
| 30 | + await cli.command('exec console.profileEnd()'); | ||
| 31 | + await delay(250); | ||
| 33 | 32 | assert.match(cli.output, /undefined/); | |
| 34 | 33 | assert.match(cli.output, /Captured new CPU profile\./); | |
| 35 | - }) | ||
| 36 | - .then(() => cli.quit()) | ||
| 37 | - .then(null, onFatal); | ||
| 34 | + await cli.quit(); | ||
| 35 | + })() | ||
| 36 | + .then(common.mustCall()); | ||
| 37 | + } catch (error) { | ||
| 38 | + return onFatal(error); | ||
| 39 | + } | ||
| 40 | + | ||
| 38 | 41 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments