Skip to content

Commit

Permalink
Ensure tests of non-returning functions don't cause unreachability er…
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg authored Sep 25, 2019
1 parent 805bb29 commit 24cd81e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions types/node/v10/node-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ import { Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer, transcode,

assert.equal(3, "3", "uses == comparator");

assert.fail('stuff broke');
if (!!true) assert.fail('stuff broke');

assert.fail('actual', 'expected', 'message');
if (!!true) assert.fail('actual', 'expected', 'message');

assert.fail(1, 2, undefined, '>');
if (!!true) assert.fail(1, 2, undefined, '>');

assert.ifError(0);

Expand Down
2 changes: 1 addition & 1 deletion types/vfile/vfile-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ file.message('test', {

file.message('test', { start: 'invalid point' }); // $ExpectError

file.fail('test');
if (!!true) file.fail('test');

const infoMessage: vfileMessage.VFileMessage = file.info('test');

Expand Down

0 comments on commit 24cd81e

Please sign in to comment.