@@ -100,16 +100,17 @@ describe("ExtensionHost", () => {
100100 ephemeral : false ,
101101 debug : false ,
102102 exitOnComplete : false ,
103+ integrationTest : true , // Set explicitly for testing
103104 }
104105
105106 const host = new ExtensionHost ( options )
106107
107- // Options are stored but integrationTest is set to true
108+ // Options are stored as-is
108109 const storedOptions = getPrivate < ExtensionHostOptions > ( host , "options" )
109110 expect ( storedOptions . mode ) . toBe ( options . mode )
110111 expect ( storedOptions . workspacePath ) . toBe ( options . workspacePath )
111112 expect ( storedOptions . extensionPath ) . toBe ( options . extensionPath )
112- expect ( storedOptions . integrationTest ) . toBe ( true ) // Always set to true in constructor
113+ expect ( storedOptions . integrationTest ) . toBe ( true )
113114 } )
114115
115116 it ( "should be an EventEmitter instance" , ( ) => {
@@ -298,16 +299,19 @@ describe("ExtensionHost", () => {
298299 } )
299300
300301 it ( "should suppress console when integrationTest is false" , ( ) => {
301- const host = createTestHost ( )
302+ // Capture the real console.log before any host is created
302303 const originalLog = console . log
303304
304- // Override integrationTest to false
305+ // Create host with integrationTest: true to prevent constructor from suppressing
306+ const host = createTestHost ( { integrationTest : true } )
307+
308+ // Override integrationTest to false to test suppression
305309 const options = getPrivate < ExtensionHostOptions > ( host , "options" )
306310 options . integrationTest = false
307311
308312 callPrivate ( host , "setupQuietMode" )
309313
310- // Console should be modified
314+ // Console should be modified (suppressed)
311315 expect ( console . log ) . not . toBe ( originalLog )
312316
313317 // Restore for other tests
@@ -332,9 +336,12 @@ describe("ExtensionHost", () => {
332336
333337 describe ( "restoreConsole" , ( ) => {
334338 it ( "should restore original console methods when suppressed" , ( ) => {
335- const host = createTestHost ( )
339+ // Capture the real console.log before any host is created
336340 const originalLog = console . log
337341
342+ // Create host with integrationTest: true to prevent constructor from suppressing
343+ const host = createTestHost ( { integrationTest : true } )
344+
338345 // Override integrationTest to false to actually suppress
339346 const options = getPrivate < ExtensionHostOptions > ( host , "options" )
340347 options . integrationTest = false
0 commit comments