From 90ec6021706796a4bec436ff2be26100880095af Mon Sep 17 00:00:00 2001 From: tommy-mitchell Date: Wed, 14 Sep 2022 14:12:40 -0500 Subject: [PATCH 1/2] Add tests (#142) --- source/test/fixtures/expect-error/generics/index.d.ts | 2 ++ .../test/fixtures/expect-error/generics/index.test-d.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/test/fixtures/expect-error/generics/index.d.ts b/source/test/fixtures/expect-error/generics/index.d.ts index 487b40ec..20d6a304 100644 --- a/source/test/fixtures/expect-error/generics/index.d.ts +++ b/source/test/fixtures/expect-error/generics/index.d.ts @@ -6,3 +6,5 @@ export default one; export function two(foo: T1): T1; export function two(foo: T1, bar: T2): T3; + +export const inferrable: () => T; diff --git a/source/test/fixtures/expect-error/generics/index.test-d.ts b/source/test/fixtures/expect-error/generics/index.test-d.ts index 284689dc..1d36835c 100644 --- a/source/test/fixtures/expect-error/generics/index.test-d.ts +++ b/source/test/fixtures/expect-error/generics/index.test-d.ts @@ -1,8 +1,12 @@ -import {expectError} from '../../../..'; -import one, {two} from '.'; +import {expectError, expectType} from '../../../..'; +import one, {two, inferrable} from '.'; expectError(one(true, true)); expectError(one(1, 2)); expectError(two(1, 'bar')); + +expectError(expectType(inferrable())); + +expectError(expectType(inferrable())); From bd6bff5a0d8f579c84f296d0027cc457941244bf Mon Sep 17 00:00:00 2001 From: tommy-mitchell Date: Thu, 15 Sep 2022 10:25:35 -0500 Subject: [PATCH 2/2] Comment out tests --- source/test/fixtures/expect-error/generics/index.test-d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/test/fixtures/expect-error/generics/index.test-d.ts b/source/test/fixtures/expect-error/generics/index.test-d.ts index 1d36835c..d4f1609e 100644 --- a/source/test/fixtures/expect-error/generics/index.test-d.ts +++ b/source/test/fixtures/expect-error/generics/index.test-d.ts @@ -7,6 +7,6 @@ expectError(one(1, 2)); expectError(two(1, 'bar')); -expectError(expectType(inferrable())); +// expectError(expectType(inferrable())); -expectError(expectType(inferrable())); +// expectError(expectType(inferrable()));