Skip to content

Commit

Permalink
test: remove await from assert
Browse files Browse the repository at this point in the history
  • Loading branch information
pete3249 committed Sep 16, 2022
1 parent 1c2eabe commit af06765
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/sequential/test-debugger-exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const path = require('path');
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.waitForPrompt();
await assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });

// Making sure it will die by default:
await cli.command('c');
Expand All @@ -34,26 +34,26 @@ const path = require('path');
// Next run: With `breakOnException` it pauses in both places.
await cli.stepCommand('r');
await cli.waitForInitialBreak();
await assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
await cli.command('breakOnException');
await cli.stepCommand('c');
await assert.ok(cli.output.includes(`exception in ${script}:3`));
assert.ok(cli.output.includes(`exception in ${script}:3`));
await cli.stepCommand('c');
await assert.ok(cli.output.includes(`exception in ${script}:9`));
assert.ok(cli.output.includes(`exception in ${script}:9`));

// Next run: With `breakOnUncaught` it only pauses on the 2nd exception.
await cli.command('breakOnUncaught');
await cli.stepCommand('r'); // Also, the setting survives the restart.
await cli.waitForInitialBreak();
await cli.waitForInitialBreak();
await assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
await cli.stepCommand('c');
await assert.ok(cli.output.includes(`exception in ${script}:9`));
assert.ok(cli.output.includes(`exception in ${script}:9`));

// Next run: Back to the initial state! It should die again.
await cli.command('breakOnNone');
await cli.stepCommand('r');
await assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
await cli.command('c');
await cli.waitFor(/disconnect/);
await cli.quit();
Expand Down

0 comments on commit af06765

Please sign in to comment.