Skip to content

Commit acf41b0

Browse files
committed
test(types): add type tests for RichTextInput min_lines/max_lines
1 parent 7233ce9 commit acf41b0

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { expectAssignable, expectError } from 'tsd';
2+
import type { RichTextInput } from '../src/index';
3+
4+
// RichTextInput — happy paths
5+
expectAssignable<RichTextInput>({
6+
type: 'rich_text_input',
7+
});
8+
expectAssignable<RichTextInput>({
9+
type: 'rich_text_input',
10+
min_lines: 3,
11+
});
12+
expectAssignable<RichTextInput>({
13+
type: 'rich_text_input',
14+
max_lines: 16,
15+
});
16+
expectAssignable<RichTextInput>({
17+
type: 'rich_text_input',
18+
min_lines: 3,
19+
max_lines: 16,
20+
});
21+
22+
// RichTextInput — sad paths
23+
expectError<RichTextInput>({
24+
type: 'rich_text_input',
25+
min_lines: '3',
26+
});
27+
expectError<RichTextInput>({
28+
type: 'rich_text_input',
29+
max_lines: '16',
30+
});

0 commit comments

Comments
 (0)