@@ -19,7 +19,7 @@ const {
1919 BRANCH_NON_EXISTENT ,
2020 BRANCH_SAME_COMMIT ,
2121 SUBDIR_NAME ,
22- TEST_REPO_PATH
22+ TEST_REPO_PATH ,
2323} = constants ;
2424
2525describe ( 'gitBranchIs' , ( ) => {
@@ -48,7 +48,7 @@ describe('gitBranchIs', () => {
4848 } ) ;
4949
5050 it ( 'callback true for same branch name in subdir' , ( done ) => {
51- gitBranchIs ( BRANCH_CURRENT , { cwd : SUBDIR_NAME } , ( err , result ) => {
51+ gitBranchIs ( BRANCH_CURRENT , { cwd : SUBDIR_NAME } , ( err , result ) => {
5252 assert . ifError ( err ) ;
5353 assert . strictEqual ( result , true ) ;
5454 done ( ) ;
@@ -90,7 +90,7 @@ describe('gitBranchIs', () => {
9090 it ( 'can specify additional git arguments' , ( done ) => {
9191 const options = {
9292 cwd : '..' ,
93- gitArgs : [ '-C' , TEST_REPO_PATH ]
93+ gitArgs : [ '-C' , TEST_REPO_PATH ] ,
9494 } ;
9595 gitBranchIs ( BRANCH_CURRENT , options , ( err , result ) => {
9696 assert . ifError ( err ) ;
@@ -100,7 +100,7 @@ describe('gitBranchIs', () => {
100100 } ) ;
101101
102102 it ( 'null gitArgs is ignored' , ( done ) => {
103- gitBranchIs ( BRANCH_CURRENT , { gitArgs : null } , ( err , result ) => {
103+ gitBranchIs ( BRANCH_CURRENT , { gitArgs : null } , ( err , result ) => {
104104 assert . ifError ( err ) ;
105105 assert . strictEqual ( result , true ) ;
106106 done ( ) ;
@@ -110,7 +110,7 @@ describe('gitBranchIs', () => {
110110 it ( 'gitArgs takes precedence over gitDir' , ( done ) => {
111111 const options = {
112112 gitArgs : [ '--git-dir=.git' ] ,
113- gitDir : 'invalid'
113+ gitDir : 'invalid' ,
114114 } ;
115115 gitBranchIs ( BRANCH_CURRENT , options , ( err , result ) => {
116116 assert . ifError ( err ) ;
@@ -122,7 +122,7 @@ describe('gitBranchIs', () => {
122122 it ( 'can specify git executable and args' , ( done ) => {
123123 const options = {
124124 gitArgs : [ path . join ( '..' , 'test-bin' , 'echo-surprise.js' ) ] ,
125- gitPath : process . execPath
125+ gitPath : process . execPath ,
126126 } ;
127127 gitBranchIs ( 'surprise' , options , ( err , result ) => {
128128 assert . ifError ( err ) ;
@@ -132,15 +132,15 @@ describe('gitBranchIs', () => {
132132 } ) ;
133133
134134 it ( 'callback Error outside of git repo' , ( done ) => {
135- gitBranchIs ( BRANCH_CURRENT , { cwd : '/' } , ( err , result ) => {
135+ gitBranchIs ( BRANCH_CURRENT , { cwd : '/' } , ( err , result ) => {
136136 assert ( err instanceof Error ) ;
137137 assert ( result === undefined || result === null ) ;
138138 done ( ) ;
139139 } ) ;
140140 } ) ;
141141
142142 it ( 'callback Error if cwd doesn\'t exist' , ( done ) => {
143- gitBranchIs ( BRANCH_CURRENT , { cwd : 'invalid' } , ( err , result ) => {
143+ gitBranchIs ( BRANCH_CURRENT , { cwd : 'invalid' } , ( err , result ) => {
144144 assert ( err instanceof Error ) ;
145145 assert ( result === undefined || result === null ) ;
146146 done ( ) ;
@@ -149,15 +149,15 @@ describe('gitBranchIs', () => {
149149
150150 it ( 'callback Error if git is not executable' , ( done ) => {
151151 const badGitPath = path . join ( __dirname , '..' , 'package.json' ) ;
152- gitBranchIs ( BRANCH_CURRENT , { gitPath : badGitPath } , ( err , result ) => {
152+ gitBranchIs ( BRANCH_CURRENT , { gitPath : badGitPath } , ( err , result ) => {
153153 assert ( err instanceof Error ) ;
154154 assert ( result === undefined || result === null ) ;
155155 done ( ) ;
156156 } ) ;
157157 } ) ;
158158
159159 it ( 'callback Error if gitDir is not a git repo' , ( done ) => {
160- gitBranchIs ( BRANCH_CURRENT , { gitDir : SUBDIR_NAME } , ( err , result ) => {
160+ gitBranchIs ( BRANCH_CURRENT , { gitDir : SUBDIR_NAME } , ( err , result ) => {
161161 assert ( err instanceof Error ) ;
162162 assert ( result === undefined || result === null ) ;
163163 done ( ) ;
@@ -168,7 +168,7 @@ describe('gitBranchIs', () => {
168168 it ( 'gitDir is relative to cwd' , ( done ) => {
169169 const options = {
170170 cwd : SUBDIR_NAME ,
171- gitDir : path . join ( '..' , '.git' )
171+ gitDir : path . join ( '..' , '.git' ) ,
172172 } ;
173173 gitBranchIs ( BRANCH_CURRENT , options , ( err , result ) => {
174174 assert . ifError ( err ) ;
@@ -181,7 +181,7 @@ describe('gitBranchIs', () => {
181181 const options = {
182182 cwd : SUBDIR_NAME ,
183183 gitArgs : [ path . join ( '..' , '..' , 'test-bin' , 'echo-surprise.js' ) ] ,
184- gitPath : path . relative ( SUBDIR_NAME , process . execPath )
184+ gitPath : path . relative ( SUBDIR_NAME , process . execPath ) ,
185185 } ;
186186 gitBranchIs ( 'surprise' , options , ( err , result ) => {
187187 assert . ifError ( err ) ;
@@ -224,7 +224,7 @@ describe('gitBranchIs', () => {
224224 ( err ) => {
225225 assert ( err instanceof TypeError ) ;
226226 assertMatch ( err . message , / \b o p t i o n s \b / ) ;
227- }
227+ } ,
228228 ) ;
229229 } ) ;
230230
@@ -250,7 +250,7 @@ describe('gitBranchIs', () => {
250250 ( result ) => { throw new Error ( 'expecting rejection' ) ; } ,
251251 ( err ) => {
252252 assert . strictEqual ( err , true ) ;
253- }
253+ } ,
254254 ) ;
255255 } ) ;
256256
@@ -261,7 +261,7 @@ describe('gitBranchIs', () => {
261261 assert ( promise instanceof global . Promise ) ;
262262 return promise . then (
263263 ( result ) => { throw new Error ( 'expecting rejection' ) ; } ,
264- ( err ) => { assert . strictEqual ( err , errTest ) ; }
264+ ( err ) => { assert . strictEqual ( err , errTest ) ; } ,
265265 ) ;
266266 } ) ;
267267
@@ -282,7 +282,7 @@ describe('gitBranchIs', () => {
282282 ( err ) => {
283283 assert ( err instanceof TypeError ) ;
284284 assertMatch ( err . message , / \b o p t i o n s \b / ) ;
285- }
285+ } ,
286286 ) ;
287287 } ) ;
288288 } ) ;
0 commit comments