| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,15 @@ | |||
| 1 | - 'use strict'; | ||
| 2 | - const common = require('../common'); | ||
| 1 | + import { skipIfInspectorDisabled } from '../common/index.mjs'; | ||
| 3 | 2 | ||
| 4 | - common.skipIfInspectorDisabled(); | ||
| 3 | + skipIfInspectorDisabled(); | ||
| 5 | 4 | ||
| 6 | - const fixtures = require('../common/fixtures'); | ||
| 7 | - const startCLI = require('../common/debugger'); | ||
| 5 | + import { path } from '../common/fixtures.mjs'; | ||
| 6 | + import startCLI from '../common/debugger.js'; | ||
| 8 | 7 | ||
| 9 | - const assert = require('assert'); | ||
| 8 | + import assert from 'assert'; | ||
| 10 | 9 | ||
| 11 | - const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]); | ||
| 10 | + const cli = startCLI([path('debugger', 'three-lines.js')]); | ||
| 12 | 11 | ||
| 13 | - (async () => { | ||
| 12 | + try { | ||
| 14 | 13 | await cli.waitForInitialBreak(); | |
| 15 | 14 | await cli.waitForPrompt(); | |
| 16 | 15 | await cli.command('exec a = function func() {}; a;'); | |
@@ -29,6 +28,6 @@ const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]); | |||
| 29 | 28 | assert.match(cli.output, /\[GeneratorFunction: function\*func\]/); | |
| 30 | 29 | await cli.command('exec a = function * func() {}; a;'); | |
| 31 | 30 | assert.match(cli.output, /\[GeneratorFunction\]/); | |
| 32 | - })() | ||
| 33 | - .finally(() => cli.quit()) | ||
| 34 | - .then(common.mustCall()); | ||
| 31 | + } finally { | ||
| 32 | + cli.quit(); | ||
| 33 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments