Skip to content

[ci-failure] Vitest test failure: /sitemap-index.xml link not excluded in prose-quality test #1861

@github-actions

Description

@github-actions

Workflow: CI
Run: #25347463141
Job: Run Vitest Tests
Step: Run Vitest tests with coverage

Failure

The test prose quality > 2022-06-30-helpful-404s-for-jekyll-and-github-pages.md > does not have broken internal links in src/content/prose-quality.test.ts fails:

AssertionError: Found broken internal links: /sitemap-index.xml: expected [ '/sitemap-index.xml' ] to have a length of +0 but got 1

Root Cause

The blog post src/content/posts/2022-06-30-helpful-404s-for-jekyll-and-github-pages.md (line 16) links to /sitemap-index.xml:

2. Your browser would retrieve and parse my site's [`sitemap.xml`](/sitemap-index.xml)[^2]

The prose quality test (src/content/prose-quality.test.ts, line 206) already excludes /sitemap.xml since it's a generated file — but not /sitemap-index.xml, the Astro sitemap URL:

// Skip generated files
if (url.startsWith('/sitemap.xml')) {  // only covers /sitemap.xml, not /sitemap-index.xml
  continue;
}

Since /sitemap-index.xml is generated at build time (not a source file), the test incorrectly flags it as a broken link.

Suggested Fix

Update src/content/prose-quality.test.ts around line 206:

// Skip generated files
if (url.startsWith('/sitemap')) {
  continue;
}

This covers both /sitemap.xml and /sitemap-index.xml since neither exists as a source file — both are generated at build time by Astro.

Category

Test failure — the prose quality test's generated-file exclusion list is incomplete.

Generated by Ci Doctor ·

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions