@@ -249,6 +249,32 @@ test.serial('Accept a partial "presetConfig" object as option', async (t) => {
249
249
t . regex ( changelog , new RegExp ( escape ( "* Change test ([222](https://github.com/owner/repo/commit/222))" ) ) ) ;
250
250
} ) ;
251
251
252
+ test . serial ( 'Accept ignoreCommits in "presetConfig" object as option' , async ( t ) => {
253
+ const { generateNotes } = await import ( "../index.js" ) ;
254
+ const commits = [
255
+ { hash : "111" , message : "fix: First fix" } ,
256
+ { hash : "222" , message : "test: Change test [python]" } ,
257
+ ] ;
258
+ const changelog = await generateNotes (
259
+ {
260
+ preset : "conventionalcommits" ,
261
+ presetConfig : {
262
+ ignoreCommits : "\\[python\\]" ,
263
+ types : [
264
+ { type : "fix" , section : "Bug Fixes" , hidden : false } ,
265
+ { type : "test" , section : "Test !!" , hidden : false } ,
266
+ ] ,
267
+ } ,
268
+ } ,
269
+ { cwd, options : { repositoryUrl } , lastRelease, nextRelease, commits }
270
+ ) ;
271
+
272
+ t . regex ( changelog , / # # # B u g F i x e s / ) ;
273
+ t . regex ( changelog , new RegExp ( escape ( "First fix" ) ) ) ;
274
+ t . notRegex ( changelog , / # # # T e s t ! ! / ) ;
275
+ t . notRegex ( changelog , new RegExp ( escape ( "* Change test ([222](https://github.com/owner/repo/commit/222))" ) ) ) ;
276
+ } ) ;
277
+
252
278
test . serial ( 'Use "gitHead" from "lastRelease" and "nextRelease" if "gitTag" is not defined' , async ( t ) => {
253
279
const { generateNotes } = await import ( "../index.js" ) ;
254
280
const commits = [
0 commit comments