@@ -79,12 +79,12 @@ describe('install route', () => {
79
79
80
80
nock ( registryUrl )
81
81
. get ( '/-/v1/search' )
82
- . query ( true )
83
- . reply ( 200 , { objects : this . packages . map ( data => ( { package : data } ) ) } )
82
+ . query ( true )
83
+ . reply ( 200 , { objects : this . packages . map ( data => ( { package : data } ) ) } )
84
84
. filteringPath ( / \/ [ ^ ? ] + $ / g, '/pkg' )
85
- . get ( '/pkg' )
86
- . times ( 4 )
87
- . reply ( 200 , this . pkgData ) ;
85
+ . get ( '/pkg' )
86
+ . times ( 4 )
87
+ . reply ( 200 , this . pkgData ) ;
88
88
89
89
nock ( 'http://yeoman.io' )
90
90
. get ( '/blacklist.json' )
@@ -104,7 +104,7 @@ describe('install route', () => {
104
104
return Promise . resolve ( { searchTerm : 'unicorn' } ) ;
105
105
}
106
106
if ( call === 2 ) {
107
- const choices = arg [ 0 ] . choices ;
107
+ const { choices} = arg [ 0 ] ;
108
108
assert . equal ( _ . filter ( choices , { value : 'generator-foo' } ) . length , 1 ) ;
109
109
assert . equal ( _ . filter ( choices , { value : 'generator-unicorn-1' } ) . length , 1 ) ;
110
110
assert . equal ( _ . filter ( choices , { value : 'generator-unicorn' } ) . length , 0 ) ;
@@ -126,7 +126,7 @@ describe('install route', () => {
126
126
return Promise . resolve ( { searchTerm : 'blacklist' } ) ;
127
127
}
128
128
if ( call === 2 ) {
129
- const choices = arg [ 0 ] . choices ;
129
+ const { choices} = arg [ 0 ] ;
130
130
assert . equal ( _ . filter ( choices , { value : 'generator-blacklist-1' } ) . length , 0 ) ;
131
131
assert . equal ( _ . filter ( choices , { value : 'generator-blacklist-2' } ) . length , 0 ) ;
132
132
assert . equal ( _ . filter ( choices , { value : 'generator-blacklist-3' } ) . length , 1 ) ;
@@ -233,7 +233,7 @@ describe('install route', () => {
233
233
}
234
234
235
235
if ( call === 2 ) {
236
- const choices = arg [ 0 ] . choices ;
236
+ const { choices} = arg [ 0 ] ;
237
237
assert . deepEqual ( _ . map ( choices , 'value' ) , [ 'install' , 'home' ] ) ;
238
238
done ( ) ;
239
239
}
0 commit comments