@@ -265,22 +265,22 @@ describe('Metalsmith', function () {
265
265
const m = Metalsmith ( fixture ( 'match' ) )
266
266
m . process ( function ( err ) {
267
267
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'] )
272
272
done ( )
273
273
} )
274
274
} )
275
275
276
276
it ( 'should include dotfiles, unless specified otherwise' , function ( done ) {
277
277
const m = Metalsmith ( fixture ( 'match' ) )
278
- m . process ( function ( err ) {
278
+ m . process ( function ( err , files ) {
279
279
if ( err ) done ( err )
280
280
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' ] )
284
284
done ( )
285
285
} )
286
286
} )
@@ -295,8 +295,8 @@ describe('Metalsmith', function () {
295
295
} )
296
296
} ) . process ( function ( err ) {
297
297
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'] )
300
300
done ( )
301
301
} )
302
302
} )
0 commit comments