Skip to content

Commit c792f10

Browse files
committed
Fix type tests for t.assert()
1 parent 0d7bbd5 commit c792f10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test-types/import-in-cts/assertions-as-type-guards.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const expected: Expected = {foo: 'bar'};
66

77
test('assert', t => {
88
const actual = expected as Expected | undefined;
9-
if (t.truthy(actual)) {
9+
if (t.assert(actual)) {
1010
expectType<Expected>(actual);
1111
} else {
1212
expectType<undefined>(actual);

test-types/module/assertions-as-type-guards.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const expected: Expected = {foo: 'bar'};
77

88
test('assert', t => {
99
const actual = expected as Expected | undefined;
10-
if (t.truthy(actual)) {
10+
if (t.assert(actual)) {
1111
expectType<Expected>(actual);
1212
} else {
1313
expectType<undefined>(actual);

0 commit comments

Comments
 (0)