@@ -32,7 +32,8 @@ test('travisDiff()', function (t) {
3232 var stepThree = 'Lorem.\n' + stepOne + '\nLorem.' ;
3333 var other = 'Lorem ipsum.' ;
3434 var initial ;
35- var final ;
35+
36+ delete process . env . TRAVIS_COMMIT_RANGE ;
3637
3738 t . plan ( 7 ) ;
3839
@@ -62,6 +63,15 @@ test('travisDiff()', function (t) {
6263 fs . writeFile ( file . path , file . contents , next ) ;
6364 } ) ;
6465 } )
66+ . use ( function ( ) {
67+ return execa ( 'git' , [ 'config' , '--global' , 'user.email' ] )
68+ . catch ( function ( ) {
69+ return execa ( 'git' , [ 'config' , '--global' , 'user.email' , '[email protected] ' ] ) 70+ . then ( function ( ) {
71+ return execa ( 'git' , [ 'config' , '--global' , 'user.name' , 'Ex Ample' ] ) ;
72+ } ) ;
73+ } ) ;
74+ } )
6575 . use ( function ( ) {
6676 return execa ( 'git' , [ 'add' , 'example.txt' ] ) ;
6777 } )
@@ -143,9 +153,7 @@ test('travisDiff()', function (t) {
143153 . use ( function ( result , next ) {
144154 var file = vfile ( { path : 'example.txt' , contents : stepTwo } ) ;
145155
146- final = result . stdout ;
147-
148- process . env . TRAVIS_COMMIT_RANGE = [ initial , final ] . join ( '...' ) ;
156+ process . env . TRAVIS_COMMIT_RANGE = [ initial , result . stdout ] . join ( '...' ) ;
149157
150158 processor . process ( file , function ( err ) {
151159 t . deepEqual (
0 commit comments