@@ -265,22 +265,22 @@ describe('Metalsmith', function () {
265265 const m = Metalsmith ( fixture ( 'match' ) )
266266 m . process ( function ( err ) {
267267 if ( err ) done ( err )
268- const negationMatches = m . match ( '!index.md' ) . join ( ',' )
269- const orMatches = m . match ( '*.{jpg,md}' ) . join ( ',' )
270- assert . equal ( negationMatches , ` .htaccess,team.jpg, ${ path . join ( 'nested' , 'index.md' ) } ` )
271- assert . equal ( orMatches , 'index.md, team.jpg' )
268+ const negationMatches = m . match ( '!index.md' )
269+ const orMatches = m . match ( '*.{jpg,md}' )
270+ assert . deepStrictEqual ( negationMatches , [ ' .htaccess' , path . join ( 'nested' , 'index.md' ) , 'team.jpg' ] )
271+ assert . deepStrictEqual ( orMatches , [ 'index.md' , ' team.jpg'] )
272272 done ( )
273273 } )
274274 } )
275275
276276 it ( 'should include dotfiles, unless specified otherwise' , function ( done ) {
277277 const m = Metalsmith ( fixture ( 'match' ) )
278- m . process ( function ( err ) {
278+ m . process ( function ( err , files ) {
279279 if ( err ) done ( err )
280280 const matchesAll = m . match ( '**' )
281- const matchesNoDot = m . match ( '**' , { dot : false } )
282- assert . deepStrictEqual ( matchesAll . sort ( ) , [ '.htaccess' , 'index.md' , path . join ( 'nested' , 'index.md' ) , 'team.jpg' ] )
283- assert . deepStrictEqual ( matchesNoDot . sort ( ) , [ 'index.md' , path . join ( 'nested' , 'index.md' ) , 'team.jpg' ] )
281+ const matchesNoDot = m . match ( '**' , Object . keys ( files ) , { dot : false } )
282+ assert . deepStrictEqual ( matchesAll , [ '.htaccess' , 'index.md' , path . join ( 'nested' , 'index.md' ) , 'team.jpg' ] )
283+ assert . deepStrictEqual ( matchesNoDot , [ 'index.md' , path . join ( 'nested' , 'index.md' ) , 'team.jpg' ] )
284284 done ( )
285285 } )
286286 } )
@@ -295,8 +295,8 @@ describe('Metalsmith', function () {
295295 } )
296296 } ) . process ( function ( err ) {
297297 if ( err ) done ( err )
298- const matches = m . match ( '**/*.md' ) . join ( ',' )
299- assert . equal ( matches , 'index.md, nested\\index.md' )
298+ const matches = m . match ( '**/*.md' )
299+ assert . deepStrictEqual ( matches , [ 'index.md' , ' nested\\index.md'] )
300300 done ( )
301301 } )
302302 } )
0 commit comments