Skip to content

Commit badb110

Browse files
test(components): harden tests by increasing timeout
1 parent 9f8c95e commit badb110

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/components/Chat/FileSuggestions.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ describe('FileSuggestions', () => {
123123

124124
await time.tick(20);
125125
stdin.write(KEY.DOWN);
126-
await time.tick();
126+
await time.tick(10);
127127
stdin.write(KEY.TAB);
128-
await time.tick();
128+
await time.tick(10);
129129

130130
expect(onSelect).toHaveBeenCalledWith({
131131
value: 'read src/components/Input.tsx ',
@@ -267,7 +267,7 @@ describe('FileSuggestions', () => {
267267

268268
await time.tick(20);
269269
stdin.write(KEY.TAB);
270-
await time.tick();
270+
await time.tick(20);
271271

272272
// Should be 'see src/components/App.tsx hello' (single space, not double)
273273
// Cursor position is right after 'see src/components/App.tsx ' (before 'hello')

src/components/ModelManager/ModelManager.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,14 +678,15 @@ describe('ModelManager', () => {
678678
/>,
679679
);
680680

681-
await time.tick(10);
681+
await time.tick(20);
682682

683683
let props = getLastSelectProps();
684684
props.onChange?.('download');
685-
await time.tick(10);
685+
await time.tick(20);
686686

687687
props = getLastSelectProps();
688688
props.onChange?.('qwen2.5-coder:7b');
689+
await time.tick(0); // flush microtasks
689690
await time.tick(10);
690691

691692
expect(lastFrame()).toContain('Downloading model');

0 commit comments

Comments
 (0)