@@ -26,7 +26,7 @@ describe('Environment Activation Behavior', () => {
26
26
}
27
27
} )
28
28
29
- test ( 'should not activate environment when required packages are missing from environment directories' , async ( ) => {
29
+ test ( 'should generate shell code with warnings when required packages are missing from environment directories' , async ( ) => {
30
30
// Create a project with dependency requirements
31
31
const projectDir = path . join ( tempDir , 'project' )
32
32
fs . mkdirSync ( projectDir )
@@ -63,13 +63,14 @@ dependencies:
63
63
skipGlobal : true // Focus on local environment for this test
64
64
} )
65
65
66
- // Shell output should be empty or contain error messages, not environment setup
67
- expect ( shellOutput ) . not . toContain ( 'export PATH=' )
68
- expect ( shellOutput ) . not . toContain ( 'LAUNCHPAD_ORIGINAL_PATH' )
66
+ // Shell output should be generated for development workflows even when packages missing
67
+ expect ( shellOutput ) . toContain ( 'export PATH=' )
68
+ expect ( shellOutput ) . toContain ( 'LAUNCHPAD_ORIGINAL_PATH' )
69
69
70
70
// Should have error messages about missing packages
71
71
expect ( errorOutput ) . toContain ( 'Environment not ready' )
72
72
expect ( errorOutput ) . toContain ( 'Local packages need installation' )
73
+ expect ( errorOutput ) . toContain ( 'Generating minimal shell environment for development' )
73
74
74
75
} finally {
75
76
// Restore original stdout/stderr
@@ -78,7 +79,7 @@ dependencies:
78
79
}
79
80
} )
80
81
81
- test ( 'should activate environment only when required packages are actually installed in environment directories' , async ( ) => {
82
+ test ( 'should generate shell code with warnings when environment directories are empty ' , async ( ) => {
82
83
// Create a project directory
83
84
const projectDir = path . join ( tempDir , 'project' )
84
85
fs . mkdirSync ( projectDir )
@@ -128,9 +129,10 @@ dependencies:
128
129
skipGlobal : true
129
130
} )
130
131
131
- // With empty environment, should not activate
132
- expect ( shellOutput ) . not . toContain ( 'export PATH=' )
132
+ // With empty environment, should still generate shell code for development workflows
133
+ expect ( shellOutput ) . toContain ( 'export PATH=' )
133
134
expect ( errorOutput ) . toContain ( 'Environment not ready' )
135
+ expect ( errorOutput ) . toContain ( 'Generating minimal shell environment for development' )
134
136
135
137
} finally {
136
138
process . stdout . write = originalStdout
0 commit comments