@@ -47,6 +47,7 @@ describe('hlx deploy', () => {
4747 mockDeploy . withCreatePackages . returnsThis ( ) ;
4848 mockDeploy . withAddStrain . returnsThis ( ) ;
4949 mockDeploy . withStatic . returnsThis ( ) ;
50+ mockDeploy . withMinify . returnsThis ( ) ;
5051 mockDeploy . run . returnsThis ( ) ;
5152
5253 // disable static functions as well to avoid shelljs executions.
@@ -126,6 +127,7 @@ OpenWhisk Namespace is required`);
126127 sinon . assert . calledWith ( mockDeploy . withCreatePackages , 'auto' ) ;
127128 sinon . assert . calledWith ( mockDeploy . withCircleciAuth , '' ) ;
128129 sinon . assert . calledWith ( mockDeploy . withDryRun , false ) ;
130+ sinon . assert . calledWith ( mockDeploy . withMinify , false ) ;
129131 sinon . assert . calledOnce ( mockDeploy . run ) ;
130132 } ) ;
131133
@@ -148,6 +150,7 @@ OpenWhisk Namespace is required`);
148150 sinon . assert . calledWith ( mockDeploy . withDefault , undefined ) ;
149151 sinon . assert . calledWith ( mockDeploy . withCircleciAuth , 'foobar' ) ;
150152 sinon . assert . calledWith ( mockDeploy . withDryRun , true ) ;
153+ sinon . assert . calledWith ( mockDeploy . withMinify , true ) ;
151154 sinon . assert . calledOnce ( mockDeploy . run ) ;
152155 } ) ;
153156
@@ -328,6 +331,19 @@ OpenWhisk Namespace is required`);
328331 sinon . assert . calledOnce ( mockDeploy . run ) ;
329332 } ) ;
330333
334+ it ( 'hlx deploy can enable minify' , ( ) => {
335+ new CLI ( )
336+ . withCommandExecutor ( 'deploy' , mockDeploy )
337+ . run ( [ 'deploy' ,
338+ '--wsk-auth' , 'secret-key' ,
339+ '--wsk-namespace' , 'hlx' ,
340+ '--minify' ,
341+ ] ) ;
342+
343+ sinon . assert . calledWith ( mockDeploy . withMinify , true ) ;
344+ sinon . assert . calledOnce ( mockDeploy . run ) ;
345+ } ) ;
346+
331347 it ( 'hlx deploy can add strain' , ( ) => {
332348 new CLI ( )
333349 . withCommandExecutor ( 'deploy' , mockDeploy )
0 commit comments