@@ -126,10 +126,13 @@ test.serial('Commit files matching the patterns in "assets"', async t => {
126126 // Verify file2 and file1 have been commited
127127 // file4.js is excluded as no glob matching
128128 // file3.css is ignored due to the negative glob '!dir/*.css'
129- // file5.js is ignore because it's in the .gitignore
129+ // file5.js is not ignored even if it's in the .gitignore
130130 // file6.js and file7.css are included because dir2 is expanded
131- t . deepEqual ( await gitCommitedFiles ( ) , [ 'dir/file2.js' , 'dir2/file6.js' , 'dir2/file7.css' , 'file1.js' ] ) ;
132- t . deepEqual ( t . context . log . args [ 0 ] , [ 'Found %d file(s) to commit' , 4 ] ) ;
131+ t . deepEqual (
132+ ( await gitCommitedFiles ( ) ) . sort ( ) ,
133+ [ 'dir/file2.js' , 'dir2/file6.js' , 'dir2/file7.css' , 'file1.js' , 'file5.js' ] . sort ( )
134+ ) ;
135+ t . deepEqual ( t . context . log . args [ 0 ] , [ 'Found %d file(s) to commit' , 5 ] ) ;
133136} ) ;
134137
135138test . serial ( 'Commit files matching the patterns in "assets" as Objects' , async t => {
@@ -155,10 +158,13 @@ test.serial('Commit files matching the patterns in "assets" as Objects', async t
155158 // Verify file2 and file1 have been commited
156159 // file4.js is excluded as no glob matching
157160 // file3.css is ignored due to the negative glob '!dir/*.css'
158- // file5.js is ignore because it's in the .gitignore
161+ // file5.js is not ignored even if it's in the .gitignore
159162 // file6.js and file7.css are included because dir2 is expanded
160- t . deepEqual ( await gitCommitedFiles ( ) , [ 'dir/file2.js' , 'dir2/file6.js' , 'dir2/file7.css' , 'file1.js' ] ) ;
161- t . deepEqual ( t . context . log . args [ 0 ] , [ 'Found %d file(s) to commit' , 4 ] ) ;
163+ t . deepEqual (
164+ ( await gitCommitedFiles ( ) ) . sort ( ) ,
165+ [ 'dir/file2.js' , 'dir2/file6.js' , 'dir2/file7.css' , 'file1.js' , 'file5.js' ] . sort ( )
166+ ) ;
167+ t . deepEqual ( t . context . log . args [ 0 ] , [ 'Found %d file(s) to commit' , 5 ] ) ;
162168} ) ;
163169
164170test . serial ( 'Commit files matching the patterns in "assets" as single glob' , async t => {
@@ -237,19 +243,3 @@ test.serial('Skip commit if there is no files to commit', async t => {
237243 t . deepEqual ( t . context . log . args [ 0 ] , [ 'Creating tag %s' , nextRelease . gitTag ] ) ;
238244 t . deepEqual ( t . context . log . args [ 1 ] , [ 'Prepared Git release: %s' , nextRelease . gitTag ] ) ;
239245} ) ;
240-
241- test . serial ( 'Skip commit if all the modified files are in .gitignore' , async t => {
242- const pluginConfig = { assets : 'dist' } ;
243- const lastRelease = { } ;
244- const nextRelease = { version : '2.0.0' , gitTag : 'v2.0.0' } ;
245-
246- await outputFile ( 'dist/files1.js' , 'Test content' ) ;
247- await outputFile ( '.gitignore' , 'dist/**/*' ) ;
248-
249- await prepare ( pluginConfig , { options : t . context . options , lastRelease, nextRelease, logger : t . context . logger } ) ;
250-
251- // Verify the files that have been commited
252- t . deepEqual ( await gitCommitedFiles ( ) , [ ] ) ;
253- t . deepEqual ( t . context . log . args [ 0 ] , [ 'Creating tag %s' , nextRelease . gitTag ] ) ;
254- t . deepEqual ( t . context . log . args [ 1 ] , [ 'Prepared Git release: %s' , nextRelease . gitTag ] ) ;
255- } ) ;
0 commit comments