Skip to content

Commit

Permalink
Use ts-ignore comment (#1969)
Browse files Browse the repository at this point in the history
Follow-up to #1956.
  • Loading branch information
novemberborn authored and sindresorhus committed Oct 29, 2018
1 parent aa35f15 commit 5db3573
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/ts-types/throws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class CustomError extends Error {

test('throws', t => {
const err1: Error = t.throws(() => {});
// t.is(err1.foo, 'foo');
// @ts-ignore
t.is(err1.foo, 'foo');
const err2: CustomError = t.throws(() => {});
t.is(err2.foo, 'foo');
const err3 = t.throws<CustomError>(() => {});
Expand All @@ -20,7 +21,8 @@ test('throws', t => {

test('throwsAsync', async t => {
const err1: Error = await t.throwsAsync(Promise.reject());
// t.is(err1.foo, 'foo');
// @ts-ignore
t.is(err1.foo, 'foo');
const err2 = await t.throwsAsync<CustomError>(Promise.reject());
t.is(err2.foo, 'foo');
});

0 comments on commit 5db3573

Please sign in to comment.