@@ -792,6 +792,7 @@ describe("CLI commands", () => {
792792describe ( "imageTag priority behavior" , ( ) => {
793793 // Tests for the imageTag priority: --tag flag > PGAI_TAG env var > pkg.version
794794 // This verifies the fix that prevents stale .env PGAI_TAG from being used
795+ // These tests spawn subprocesses so need longer timeout
795796
796797 let tempDir : string ;
797798
@@ -828,7 +829,7 @@ describe("imageTag priority behavior", () => {
828829 expect ( envContent ) . not . toMatch ( / P G A I _ T A G = b e t a / ) ;
829830 // It should contain the CLI version (0.0.0-dev.0 in dev)
830831 expect ( envContent ) . toMatch ( / P G A I _ T A G = \d + \. \d + \. \d + | P G A I _ T A G = 0 \. 0 \. 0 - d e v / ) ;
831- } ) ;
832+ } , 30000 ) ;
832833
833834 test ( "--tag flag takes priority over pkg.version" , ( ) => {
834835 const testDir = resolve ( tempDir , "tag-flag-test" ) ;
@@ -848,7 +849,7 @@ describe("imageTag priority behavior", () => {
848849 // Verify stdout confirms the tag being used
849850 const stdout = new TextDecoder ( ) . decode ( result . stdout ) ;
850851 expect ( stdout ) . toMatch ( / U s i n g i m a g e t a g : v 1 \. 2 \. 3 - c u s t o m / ) ;
851- } ) ;
852+ } , 30000 ) ;
852853
853854 test ( "PGAI_TAG env var is intentionally ignored (Bun auto-loads .env)" , ( ) => {
854855 // Note: We do NOT use process.env.PGAI_TAG because Bun auto-loads .env files,
@@ -869,7 +870,7 @@ describe("imageTag priority behavior", () => {
869870 // PGAI_TAG env var should be IGNORED - uses pkg.version instead
870871 expect ( envContent ) . not . toMatch ( / P G A I _ T A G = v 2 \. 0 \. 0 - f r o m - e n v / ) ;
871872 expect ( envContent ) . toMatch ( / P G A I _ T A G = \d + \. \d + \. \d + | P G A I _ T A G = 0 \. 0 \. 0 - d e v / ) ;
872- } ) ;
873+ } , 30000 ) ;
873874
874875 test ( "existing registry and password are preserved while tag is updated" , ( ) => {
875876 const testDir = resolve ( tempDir , "preserve-test" ) ;
@@ -894,5 +895,5 @@ describe("imageTag priority behavior", () => {
894895 // But registry and password should be preserved
895896 expect ( envContent ) . toMatch ( / P G A I _ R E G I S T R Y = m y \. r e g i s t r y \. c o m / ) ;
896897 expect ( envContent ) . toMatch ( / G F _ S E C U R I T Y _ A D M I N _ P A S S W O R D = s e c r e t 1 2 3 / ) ;
897- } ) ;
898+ } , 30000 ) ;
898899} ) ;
0 commit comments