@@ -29,15 +29,15 @@ beforeEach(function() {
2929} ) ;
3030
3131describe ( 'commit' , function ( ) {
32-
32+
3333 it ( 'should commit simple messages' , function ( done ) {
34-
34+
3535 this . timeout ( config . maxTimeout ) ; // this could take a while
36-
36+
3737 // SETUP
38-
38+
3939 let dummyCommitMessage = `sip sip sippin on some sizzurp` ;
40-
40+
4141 // Describe a repo and some files to add and commit
4242 let repoConfig = {
4343 path : config . paths . endUserRepo ,
@@ -52,17 +52,17 @@ describe('commit', function() {
5252 }
5353 }
5454 } ;
55-
55+
5656 // Describe an adapter
5757 let adapterConfig = {
5858 path : path . join ( repoConfig . path , '/node_modules/cz-jira-smart-commit' ) ,
5959 npmName : 'cz-jira-smart-commit'
6060 } ;
61-
61+
6262 // Quick setup the repos, adapter, and grab a simple prompter
6363 let prompter = quickPrompterSetup ( sh , repoConfig , adapterConfig , dummyCommitMessage ) ;
6464 // TEST
65-
65+
6666 // Pass in inquirer but it never gets used since we've mocked out a different
6767 // version of prompter.
6868 commitizenCommit ( sh , inquirer , repoConfig . path , prompter , { disableAppendPaths :true , quiet :true , emitData :true } , function ( ) {
@@ -73,7 +73,7 @@ describe('commit', function() {
7373 } ) ;
7474
7575 } ) ;
76-
76+
7777 it ( 'should commit message with quotes' , function ( done ) {
7878
7979 this . timeout ( config . maxTimeout ) ; // this could take a while
@@ -120,29 +120,29 @@ describe('commit', function() {
120120
121121
122122 it ( 'should commit multiline messages' , function ( done ) {
123-
123+
124124 this . timeout ( config . maxTimeout ) ; // this could take a while
125-
125+
126126 // SETUP
127-
127+
128128 // Don't trim or delete the spacing in this commit message!
129-
129+
130130 // Git on *nix retains spaces on lines with only spaces
131131 // The blank line of this block should have 4 spaces.
132132 let nixCommitMessage =
133133 `sip sip sippin on jnkjnkjn
134134
135135 some sizzurp` ;
136-
136+
137137 // Git on win32 removes spaces from lines with only spaces
138138 // The blank line of this block should have no spaces
139139 let windowsCommitMessage =
140140 `sip sip sippin on jnkjnkjn
141141
142142 some sizzurp` ;
143-
143+
144144 let dummyCommitMessage = ( os . platform == 'win32' ) ? windowsCommitMessage : nixCommitMessage ;
145-
145+
146146 // Describe a repo and some files to add and commit
147147 let repoConfig = {
148148 path : config . paths . endUserRepo ,
@@ -157,17 +157,17 @@ describe('commit', function() {
157157 }
158158 }
159159 } ;
160-
160+
161161 // Describe an adapter
162162 let adapterConfig = {
163163 path : path . join ( repoConfig . path , '/node_modules/cz-conventional-changelog' ) ,
164164 npmName : 'cz-conventional-changelog'
165165 } ;
166-
166+
167167 // Quick setup the repos, adapter, and grab a simple prompter
168168 let prompter = quickPrompterSetup ( sh , repoConfig , adapterConfig , dummyCommitMessage ) ;
169169 // TEST
170-
170+
171171 // Pass in inquirer but it never gets used since we've mocked out a different
172172 // version of prompter.
173173 commitizenCommit ( sh , inquirer , repoConfig . path , prompter , { disableAppendPaths :true , quiet :true } , function ( ) {
@@ -180,14 +180,14 @@ describe('commit', function() {
180180 } ) ;
181181
182182 it ( 'should allow to override git commit options' , function ( done ) {
183-
183+
184184 this . timeout ( config . maxTimeout ) ; // this could take a while
185-
185+
186186 // SETUP
187-
187+
188188 let dummyCommitMessage = `sip sip sippin on some sizzurp` ;
189189 let author = `A U Thor <author@example.com>` ;
190-
190+
191191 // Describe a repo and some files to add and commit
192192 let repoConfig = {
193193 path : config . paths . endUserRepo ,
@@ -202,21 +202,21 @@ describe('commit', function() {
202202 }
203203 }
204204 } ;
205-
205+
206206 // Describe an adapter
207207 let adapterConfig = {
208208 path : path . join ( repoConfig . path , '/node_modules/cz-jira-smart-commit' ) ,
209209 npmName : 'cz-jira-smart-commit'
210210 } ;
211-
211+
212212 let options = {
213213 args : `--author="${ author } " --no-edit`
214214 } ;
215-
215+
216216 // Quick setup the repos, adapter, and grab a simple prompter
217217 let prompter = quickPrompterSetup ( sh , repoConfig , adapterConfig , dummyCommitMessage , options ) ;
218218 // TEST
219-
219+
220220 // Pass in inquirer but it never gets used since we've mocked out a different
221221 // version of prompter.
222222 commitizenCommit ( sh , inquirer , repoConfig . path , prompter , { disableAppendPaths :true , quiet :true , emitData :true } , function ( ) {
@@ -228,15 +228,17 @@ describe('commit', function() {
228228 } ) ;
229229
230230 } ) ;
231-
231+
232232} ) ;
233233
234234afterEach ( function ( ) {
235+ this . timeout ( config . maxTimeout ) ; // this could take a while
235236 // All this should do is archive the tmp path to the artifacts
236237 clean . afterEach ( sh , config . paths . tmp , config . preserve ) ;
237238} ) ;
238239
239240after ( function ( ) {
241+ this . timeout ( config . maxTimeout ) ; // this could take a while
240242 // Once everything is done, the artifacts should be cleaned up based on
241243 // the preserve setting in the config
242244 clean . after ( sh , config . paths . tmp , config . preserve ) ;
@@ -247,23 +249,23 @@ after(function() {
247249 * prompter is overriden for testing purposes.
248250 */
249251function quickPrompterSetup ( sh , repoConfig , adapterConfig , commitMessage , options = { } ) {
250-
252+
251253 commitizenInit ( sh , repoConfig . path , adapterConfig . npmName ) ;
252-
254+
253255 // NOTE:
254256 // In our real code we'd use this here but since we're testing,
255257 // we'll provide prompter. We'd normally use:
256258 // let prompter = getPrompter(adapterConfig.path);
257259 let prompter = function ( cz , commit ) {
258260 commit ( commitMessage , options ) ;
259261 }
260-
262+
261263 gitInit ( sh , repoConfig . path ) ;
262-
264+
263265 writeFilesToPath ( repoConfig . files , repoConfig . path ) ;
264-
266+
265267 gitAdd ( sh , repoConfig . path ) ;
266-
268+
267269 // NOTE: In the real world we would not be returning
268270 // this we would instead be just making the commented
269271 // out getPrompter() call to get user input (above).
0 commit comments