File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ describe('With wasm CLI', async () => {
7979 defaultProjectID : ""
8080 }
8181
82- await cli . configureOutput ( { width : 100 } )
82+ await cli . configureOutput ( { width : 100 , color : false } )
8383 const resp = await cli . run ( runCfg , [ 'marketplace' , 'image' , 'list' ] )
8484 console . log ( resp )
8585 expect ( resp . exitCode ) . toBe ( 0 )
@@ -88,6 +88,21 @@ describe('With wasm CLI', async () => {
8888 expect ( lines [ 2 ] . length ) . toBeLessThan ( 100 )
8989 } )
9090
91+ it ( 'can enable colors' , async ( ) => {
92+ const runCfg = {
93+ jwt : "" ,
94+ defaultProjectID : ""
95+ }
96+
97+ await cli . configureOutput ( { width : 100 , color : false } )
98+ const resp = await cli . run ( runCfg , [ 'invalid' ] )
99+ await cli . configureOutput ( { width : 100 , color : true } )
100+ const coloredResp = await cli . run ( runCfg , [ 'invalid' ] )
101+
102+ expect ( coloredResp . stderr . length ) . toBeGreaterThan ( resp . stderr . length )
103+ expect ( coloredResp . stderr ) . not . toEqual ( resp . stderr )
104+ } )
105+
91106 afterAll ( async ( ) => {
92107 try {
93108 await cli . stop ( )
You can’t perform that action at this time.
0 commit comments