@@ -39,9 +39,10 @@ describe('c8ctl Runtime', () => {
3939 } ) ;
4040
4141 test ( 'should have activeProfile property with undefined default' , ( ) => {
42- // Note: This test assumes a fresh runtime state
43- // In a real scenario, the property may have been set by previous tests
44- assert . strictEqual ( typeof c8ctl . activeProfile , 'string' as any || 'undefined' , 'activeProfile is string or undefined' ) ;
42+ // Note: This property may have been set by previous tests in the same process
43+ // We just verify it's the correct type
44+ const profile = c8ctl . activeProfile ;
45+ assert . ok ( profile === undefined || typeof profile === 'string' , 'activeProfile is undefined or string' ) ;
4546 } ) ;
4647
4748 test ( 'should be able to set and get activeProfile' , ( ) => {
@@ -54,7 +55,10 @@ describe('c8ctl Runtime', () => {
5455 } ) ;
5556
5657 test ( 'should have activeTenant property with undefined default' , ( ) => {
57- assert . strictEqual ( typeof c8ctl . activeTenant , 'string' as any || 'undefined' , 'activeTenant is string or undefined' ) ;
58+ // Note: This property may have been set by previous tests in the same process
59+ // We just verify it's the correct type
60+ const tenant = c8ctl . activeTenant ;
61+ assert . ok ( tenant === undefined || typeof tenant === 'string' , 'activeTenant is undefined or string' ) ;
5862 } ) ;
5963
6064 test ( 'should be able to set and get activeTenant' , ( ) => {
@@ -66,10 +70,9 @@ describe('c8ctl Runtime', () => {
6670 c8ctl . activeTenant = undefined ;
6771 } ) ;
6872
69- test ( 'should have outputMode property with text default' , ( ) => {
70- // Reset to default
71- c8ctl . outputMode = 'text' ;
72- assert . strictEqual ( c8ctl . outputMode , 'text' , 'outputMode defaults to text' ) ;
73+ test ( 'should have outputMode property' , ( ) => {
74+ // Verify outputMode is always set to either 'text' or 'json'
75+ assert . ok ( c8ctl . outputMode === 'text' || c8ctl . outputMode === 'json' , 'outputMode is text or json' ) ;
7376 } ) ;
7477
7578 test ( 'should be able to set and get outputMode' , ( ) => {
0 commit comments