@@ -145,7 +145,10 @@ test('Return "major" if there is a breaking change, using default releaseRules',
145145} ) ;
146146
147147test ( 'Return "major" if there is a "conventionalcommits" breaking change, using default releaseRules' , async t => {
148- const commits = [ { hash : '123' , message : 'fix: First fix' } , { hash : '456' , message : 'feat!: Breaking change feature' } ] ;
148+ const commits = [
149+ { hash : '123' , message : 'fix: First fix' } ,
150+ { hash : '456' , message : 'feat!: Breaking change feature' } ,
151+ ] ;
149152 const releaseType = await analyzeCommits ( { preset : 'conventionalcommits' } , { cwd, commits, logger : t . context . logger } ) ;
150153
151154 t . is ( releaseType , 'major' ) ;
@@ -174,7 +177,13 @@ test('Return "patch" if there is only types set to "patch", using default releas
174177test ( 'Allow to use glob in "releaseRules" configuration' , async t => {
175178 const commits = [ { message : 'Chore: First chore (fixes #123)' } , { message : 'Docs: update README (fixes #456)' } ] ;
176179 const releaseType = await analyzeCommits (
177- { preset : 'eslint' , releaseRules : [ { tag : 'Chore' , release : 'patch' } , { message : '*README*' , release : 'minor' } ] } ,
180+ {
181+ preset : 'eslint' ,
182+ releaseRules : [
183+ { tag : 'Chore' , release : 'patch' } ,
184+ { message : '*README*' , release : 'minor' } ,
185+ ] ,
186+ } ,
178187 { cwd, commits, logger : t . context . logger }
179188 ) ;
180189
@@ -187,7 +196,10 @@ test('Allow to use glob in "releaseRules" configuration', async t => {
187196} ) ;
188197
189198test ( 'Return "null" if no rule match' , async t => {
190- const commits = [ { hash : '123' , message : 'doc: doc update' } , { hash : '456' , message : 'chore: Chore' } ] ;
199+ const commits = [
200+ { hash : '123' , message : 'doc: doc update' } ,
201+ { hash : '456' , message : 'chore: Chore' } ,
202+ ] ;
191203 const releaseType = await analyzeCommits ( { } , { cwd, commits, logger : t . context . logger } ) ;
192204
193205 t . is ( releaseType , null ) ;
@@ -204,7 +216,13 @@ test('Process rules in order and apply highest match', async t => {
204216 { hash : '456' , message : 'Docs: update README (fixes #456)' } ,
205217 ] ;
206218 const releaseType = await analyzeCommits (
207- { preset : 'eslint' , releaseRules : [ { tag : 'Chore' , release : 'minor' } , { tag : 'Chore' , release : 'patch' } ] } ,
219+ {
220+ preset : 'eslint' ,
221+ releaseRules : [
222+ { tag : 'Chore' , release : 'minor' } ,
223+ { tag : 'Chore' , release : 'patch' } ,
224+ ] ,
225+ } ,
208226 { cwd, commits, logger : t . context . logger }
209227 ) ;
210228
@@ -222,7 +240,13 @@ test('Process rules in order and apply highest match from config even if default
222240 { hash : '456' , message : 'Docs: update README (fixes #456) \n\n BREAKING CHANGE: break something' } ,
223241 ] ;
224242 const releaseType = await analyzeCommits (
225- { preset : 'eslint' , releaseRules : [ { tag : 'Chore' , release : 'patch' } , { breaking : true , release : 'minor' } ] } ,
243+ {
244+ preset : 'eslint' ,
245+ releaseRules : [
246+ { tag : 'Chore' , release : 'patch' } ,
247+ { breaking : true , release : 'minor' } ,
248+ ] ,
249+ } ,
226250 { cwd, commits, logger : t . context . logger }
227251 ) ;
228252
@@ -235,7 +259,10 @@ test('Process rules in order and apply highest match from config even if default
235259} ) ;
236260
237261test ( 'Allow to overwrite default "releaseRules" with "false"' , async t => {
238- const commits = [ { hash : '123' , message : 'chore: First chore' } , { hash : '456' , message : 'feat: new feature' } ] ;
262+ const commits = [
263+ { hash : '123' , message : 'chore: First chore' } ,
264+ { hash : '456' , message : 'feat: new feature' } ,
265+ ] ;
239266 const releaseType = await analyzeCommits (
240267 { preset : 'angular' , releaseRules : [ { type : 'feat' , release : false } ] } ,
241268 { cwd, commits, logger : t . context . logger }
@@ -250,9 +277,18 @@ test('Allow to overwrite default "releaseRules" with "false"', async t => {
250277} ) ;
251278
252279test ( 'Commits with an associated custom release type have higher priority than commits with release "false"' , async t => {
253- const commits = [ { hash : '123' , message : 'feat: Feature to skip' } , { hash : '456' , message : 'docs: update README' } ] ;
280+ const commits = [
281+ { hash : '123' , message : 'feat: Feature to skip' } ,
282+ { hash : '456' , message : 'docs: update README' } ,
283+ ] ;
254284 const releaseType = await analyzeCommits (
255- { preset : 'angular' , releaseRules : [ { type : 'feat' , release : false } , { type : 'docs' , release : 'patch' } ] } ,
285+ {
286+ preset : 'angular' ,
287+ releaseRules : [
288+ { type : 'feat' , release : false } ,
289+ { type : 'docs' , release : 'patch' } ,
290+ ] ,
291+ } ,
256292 { cwd, commits, logger : t . context . logger }
257293 ) ;
258294
@@ -265,7 +301,10 @@ test('Commits with an associated custom release type have higher priority than c
265301} ) ;
266302
267303test ( 'Commits with an associated default release type have higher priority than commits with release "false"' , async t => {
268- const commits = [ { hash : '123' , message : 'feat: new feature' } , { hash : '456' , message : 'fix: new Fix' } ] ;
304+ const commits = [
305+ { hash : '123' , message : 'feat: new feature' } ,
306+ { hash : '456' , message : 'fix: new Fix' } ,
307+ ] ;
269308 const releaseType = await analyzeCommits (
270309 { preset : 'angular' , releaseRules : [ { type : 'feat' , release : false } ] } ,
271310 { cwd, commits, logger : t . context . logger }
@@ -280,7 +319,10 @@ test('Commits with an associated default release type have higher priority than
280319} ) ;
281320
282321test ( 'Use default "releaseRules" if none of provided match' , async t => {
283- const commits = [ { hash : '123' , message : 'Chore: First chore' } , { hash : '456' , message : 'Update: new feature' } ] ;
322+ const commits = [
323+ { hash : '123' , message : 'Chore: First chore' } ,
324+ { hash : '456' , message : 'Update: new feature' } ,
325+ ] ;
284326 const releaseType = await analyzeCommits (
285327 { preset : 'eslint' , releaseRules : [ { tag : 'Chore' , release : 'patch' } ] } ,
286328 { cwd, commits, logger : t . context . logger }
@@ -295,7 +337,10 @@ test('Use default "releaseRules" if none of provided match', async t => {
295337} ) ;
296338
297339test ( 'Filter out empty commits' , async t => {
298- const commits = [ { hash : '123' , message : '' } , { hash : '456' , message : 'fix(scope1): First fix' } ] ;
340+ const commits = [
341+ { hash : '123' , message : '' } ,
342+ { hash : '456' , message : 'fix(scope1): First fix' } ,
343+ ] ;
299344 const releaseType = await analyzeCommits ( { } , { cwd, commits, logger : t . context . logger } ) ;
300345
301346 t . is ( releaseType , 'patch' ) ;
0 commit comments