@@ -210,17 +210,33 @@ const path = require( "path" );
210210 . catch ( ( error ) => { done ( error ) ; } )
211211 } ) . not . to . throwException ( ) ;
212212 } ) ;
213+ it ( "should be callable with parameters 'grunt' {grunt}, 'task' {task}, 'options' {object} and resolve (options.checkoutdated.ignore.packages = [ ])" , ( done ) => {
214+ const arg = [ ] ;
215+ const options = chkoutdt . getTaskOptions ( env . task ) ;
216+ options . checkoutdated . ignore . packages = arg ;
217+ expect ( ( ) => { chkoutdt . toArgs ( env . grunt , env . task , options )
218+ . then ( ( value ) => {
219+ // console.log( value );
220+ expect ( value ) . to . be . an ( "object" ) ;
221+ expect ( value . opts . checkoutdated . ignore . packages === arg ) . to . be . ok ( ) ;
222+ expect ( value . args . includes ( "--ignore-packages" ) ) . not . to . be . ok ( ) ;
223+ done ( ) ;
224+ } )
225+ . catch ( ( error ) => { done ( error ) ; } )
226+ } ) . not . to . throwException ( ) ;
227+ } ) ;
213228 it ( "should be callable with parameters 'grunt' {grunt}, 'task' {task}, 'options' {object} and resolve (options.checkoutdated.ignore.packages = [ 'some-package' ])" , ( done ) => {
214229 const pkg = "some-package" ;
215230 const arg = [ pkg ] ;
216231 const options = chkoutdt . getTaskOptions ( env . task ) ;
217232 options . checkoutdated . ignore . packages = arg ;
218233 expect ( ( ) => { chkoutdt . toArgs ( env . grunt , env . task , options )
219234 . then ( ( value ) => {
220- // console.log( value );
235+ console . log ( value ) ;
221236 expect ( value ) . to . be . an ( "object" ) ;
222237 expect ( value . opts . checkoutdated . ignore . packages === arg ) . to . be . ok ( ) ;
223238 expect ( value . args . includes ( pkg ) ) . to . be . ok ( ) ;
239+ expect ( value . args . includes ( "--ignore-packages" ) ) . to . be . ok ( ) ;
224240 done ( ) ;
225241 } )
226242 . catch ( ( error ) => { done ( error ) ; } )
@@ -235,6 +251,7 @@ const path = require( "path" );
235251 // console.log( value );
236252 expect ( value ) . to . be . an ( "object" ) ;
237253 expect ( value . opts . checkoutdated . ignore . packages === arg ) . to . be . ok ( ) ;
254+ expect ( value . args . includes ( "--ignore-packages" ) ) . not . to . be . ok ( ) ;
238255 done ( ) ;
239256 } )
240257 . catch ( ( error ) => { done ( error ) ; } )
0 commit comments