@@ -9,7 +9,7 @@ describe('markdown linting integration', () => {
99 describe ( 'end-to-end markdown linting' , ( ) => {
1010 it ( 'should apply linting when generating changelog to file' , async ( ) => {
1111 const testOutputPath = 'test/test-output-changelog.md'
12-
12+
1313 // Clean up any existing test file
1414 if ( existsSync ( testOutputPath ) ) {
1515 unlinkSync ( testOutputPath )
@@ -26,12 +26,12 @@ describe('markdown linting integration', () => {
2626
2727 try {
2828 const result = await generateChangelog ( config )
29-
29+
3030 // Verify the result structure
3131 expect ( result ) . toBeDefined ( )
3232 expect ( result . format ) . toBe ( 'markdown' )
3333 expect ( result . outputPath ) . toContain ( testOutputPath )
34-
34+
3535 // Verify the file was created and contains expected content
3636 if ( existsSync ( testOutputPath ) ) {
3737 const fileContent = readFileSync ( testOutputPath , 'utf-8' )
@@ -64,13 +64,13 @@ describe('markdown linting integration', () => {
6464
6565 try {
6666 const result = await generateChangelog ( config )
67-
67+
6868 // Verify that console output gets linting applied
6969 expect ( result ) . toBeDefined ( )
7070 expect ( result . format ) . toBe ( 'markdown' )
7171 expect ( result . outputPath ) . toBeUndefined ( )
7272 expect ( typeof result . content ) . toBe ( 'string' )
73-
73+
7474 // Content should be processed (even if linting currently falls back)
7575 expect ( result . content . length ) . toBeGreaterThanOrEqual ( 0 )
7676 }
@@ -82,7 +82,7 @@ describe('markdown linting integration', () => {
8282
8383 it ( 'should merge with existing changelog and apply linting' , async ( ) => {
8484 const testOutputPath = 'test/test-merge-changelog.md'
85-
85+
8686 // Create an existing changelog with formatting issues
8787 const existingContent = `# Changelog
8888
@@ -107,10 +107,10 @@ describe('markdown linting integration', () => {
107107
108108 try {
109109 const result = await generateChangelog ( config )
110-
110+
111111 expect ( result ) . toBeDefined ( )
112112 expect ( result . format ) . toBe ( 'markdown' )
113-
113+
114114 // Verify the file was updated and should have linting applied
115115 if ( existsSync ( testOutputPath ) ) {
116116 const updatedContent = readFileSync ( testOutputPath , 'utf-8' )
@@ -150,7 +150,7 @@ This content should not be immediately after the heading
150150`
151151
152152 const result = await lintMarkdown ( problematicContent , config )
153-
153+
154154 // Should return the content (potentially fixed or unchanged if markdownlint fails)
155155 expect ( typeof result ) . toBe ( 'string' )
156156 expect ( result . length ) . toBeGreaterThan ( 0 )
@@ -169,7 +169,7 @@ Content with formatting issues
169169Multiple blank lines`
170170
171171 const result = await lintMarkdown ( content , config )
172-
172+
173173 // Should return unchanged when linting is disabled
174174 expect ( result ) . toBe ( content )
175175 } )
@@ -181,7 +181,7 @@ Multiple blank lines`
181181 }
182182
183183 const result = await lintMarkdown ( '' , config )
184-
184+
185185 expect ( typeof result ) . toBe ( 'string' )
186186 } )
187187
@@ -200,7 +200,7 @@ Multiple blank lines`
200200`
201201
202202 const result = await lintMarkdown ( malformedContent , config )
203-
203+
204204 // Should not throw and return a string
205205 expect ( typeof result ) . toBe ( 'string' )
206206 expect ( result . length ) . toBeGreaterThan ( 0 )
@@ -220,9 +220,9 @@ Multiple blank lines`
220220
221221 try {
222222 const result = await generateChangelog ( config )
223-
223+
224224 expect ( result . format ) . toBe ( 'json' )
225-
225+
226226 // JSON content should not be processed through markdown linting
227227 if ( result . content ) {
228228 expect ( ( ) => JSON . parse ( result . content ) ) . not . toThrow ( )
@@ -246,9 +246,9 @@ Multiple blank lines`
246246
247247 try {
248248 const result = await generateChangelog ( config )
249-
249+
250250 expect ( result . format ) . toBe ( 'html' )
251-
251+
252252 // HTML content should not be processed through markdown linting
253253 if ( result . content ) {
254254 expect ( result . content ) . toContain ( '<!DOCTYPE html>' )
@@ -264,9 +264,9 @@ Multiple blank lines`
264264 describe ( 'test data validation' , ( ) => {
265265 it ( 'should have test changelog data file in correct location' , ( ) => {
266266 const testChangelogPath = 'test/test-changelog.md'
267-
267+
268268 expect ( existsSync ( testChangelogPath ) ) . toBe ( true )
269-
269+
270270 const content = readFileSync ( testChangelogPath , 'utf-8' )
271271 expect ( content ) . toContain ( '# Changelog' )
272272 expect ( content . length ) . toBeGreaterThan ( 0 )
@@ -276,7 +276,7 @@ Multiple blank lines`
276276 describe ( 'author exclusion integration' , ( ) => {
277277 it ( 'should exclude bot authors from contributors section' , async ( ) => {
278278 const testOutputPath = 'test/test-authors-exclusion.md'
279-
279+
280280 // Clean up any existing test file
281281 if ( existsSync ( testOutputPath ) ) {
282282 unlinkSync ( testOutputPath )
@@ -295,17 +295,17 @@ Multiple blank lines`
295295
296296 try {
297297 const result = await generateChangelog ( config )
298-
298+
299299 expect ( result ) . toBeDefined ( )
300300 expect ( result . format ) . toBe ( 'markdown' )
301-
301+
302302 // Verify the file was created
303303 if ( existsSync ( testOutputPath ) ) {
304304 const fileContent = readFileSync ( testOutputPath , 'utf-8' )
305-
305+
306306 // Should contain changelog content
307307 expect ( fileContent ) . toContain ( '# Changelog' )
308-
308+
309309 // If there are contributors, they should NOT include bot authors
310310 if ( fileContent . includes ( '### Contributors' ) ) {
311311 expect ( fileContent ) . not . toContain ( 'dependabot[bot]' )
@@ -327,7 +327,7 @@ Multiple blank lines`
327327
328328 it ( 'should respect custom excludeAuthors configuration' , async ( ) => {
329329 const testOutputPath = 'test/test-custom-authors-exclusion.md'
330-
330+
331331 // Clean up any existing test file
332332 if ( existsSync ( testOutputPath ) ) {
333333 unlinkSync ( testOutputPath )
@@ -346,17 +346,17 @@ Multiple blank lines`
346346
347347 try {
348348 const result = await generateChangelog ( config )
349-
349+
350350 expect ( result ) . toBeDefined ( )
351351 expect ( result . format ) . toBe ( 'markdown' )
352-
352+
353353 // Verify the file was created
354354 if ( existsSync ( testOutputPath ) ) {
355355 const fileContent = readFileSync ( testOutputPath , 'utf-8' )
356-
356+
357357 // Should contain changelog content
358358 expect ( fileContent ) . toContain ( '# Changelog' )
359-
359+
360360 // If there are contributors, they should NOT include excluded authors
361361 if ( fileContent . includes ( '### Contributors' ) ) {
362362 expect ( fileContent ) . not . toContain ( 'John Doe' )
@@ -381,7 +381,7 @@ Multiple blank lines`
381381 expect ( defaultConfig . excludeAuthors ) . toContain ( 'dependabot[bot]' )
382382 expect ( defaultConfig . excludeAuthors ) . toContain ( 'github-actions[bot]' )
383383 expect ( defaultConfig . excludeAuthors ) . toHaveLength ( 2 )
384-
384+
385385 // Verify the config structure
386386 expect ( Array . isArray ( defaultConfig . excludeAuthors ) ) . toBe ( true )
387387 expect ( typeof defaultConfig . excludeAuthors [ 0 ] ) . toBe ( 'string' )
0 commit comments