@@ -686,7 +686,8 @@ describe('ModelManager', () => {
686686
687687 props = getLastSelectProps ( ) ;
688688 props . onChange ?.( 'qwen2.5-coder:7b' ) ;
689- await time . tick ( 10 ) ;
689+ await time . tick ( ) ; // flush microtasks
690+ await time . tick ( 30 ) ;
690691
691692 expect ( lastFrame ( ) ) . toContain ( 'Downloading model' ) ;
692693
@@ -718,11 +719,12 @@ describe('ModelManager', () => {
718719
719720 props = getLastSelectProps ( ) ;
720721 props . onChange ?.( 'custom' ) ;
721- await time . tick ( 10 ) ;
722+ await time . tick ( 20 ) ;
722723
723724 const textInputProps = getLastTextInputProps ( ) ;
724725 textInputProps . onSubmit ( '' ) ;
725- await time . tick ( 10 ) ;
726+ await time . tick ( ) ; // flush microtasks
727+ await time . tick ( 30 ) ;
726728
727729 expect ( lastFrame ( ) ) . toContain ( 'Enter an Ollama model name to download.' ) ;
728730 } ) ;
@@ -744,7 +746,7 @@ describe('ModelManager', () => {
744746
745747 props = getLastSelectProps ( ) ;
746748 props . onChange ?.( 'custom' ) ;
747- await time . tick ( 10 ) ;
749+ await time . tick ( 20 ) ;
748750
749751 const textInputProps = getLastTextInputProps ( ) ;
750752 textInputProps . onSubmit ( 'gemma4' ) ; // Already installed
@@ -782,7 +784,7 @@ describe('ModelManager', () => {
782784
783785 props = getLastSelectProps ( ) ;
784786 props . onChange ?.( 'custom' ) ;
785- await time . tick ( 10 ) ;
787+ await time . tick ( 20 ) ;
786788
787789 const textInputProps = getLastTextInputProps ( ) ;
788790 textInputProps . onSubmit ( 'newmodel' ) ;
@@ -809,7 +811,7 @@ describe('ModelManager', () => {
809811
810812 props = getLastSelectProps ( ) ;
811813 props . onChange ?.( 'custom' ) ;
812- await time . tick ( 10 ) ;
814+ await time . tick ( 20 ) ;
813815
814816 expect ( lastFrame ( ) ) . toContain ( 'Suggestions:' ) ;
815817 } ) ;
@@ -831,7 +833,7 @@ describe('ModelManager', () => {
831833
832834 props = getLastSelectProps ( ) ;
833835 props . onChange ?.( 'custom' ) ;
834- await time . tick ( 10 ) ;
836+ await time . tick ( 20 ) ;
835837
836838 // Simulate typing a value with a colon so the mock ModelSuggestions triggers onSelect
837839 const textInputProps = getLastTextInputProps ( ) ;
0 commit comments