Skip to content

feat: add comprehensive test suite for documentation quality#446

Draft
cursor[bot] wants to merge 3 commits intomasterfrom
cursor/application-test-suite-d88b
Draft

feat: add comprehensive test suite for documentation quality#446
cursor[bot] wants to merge 3 commits intomasterfrom
cursor/application-test-suite-d88b

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 2, 2026

Summary

This PR introduces a comprehensive automated test suite for the Plane documentation site to ensure content quality, consistency, and correctness.

Changes

Testing Infrastructure

  • ✅ Added Vitest testing framework with 230+ automated tests
  • ✅ Created test configuration with coverage support
  • ✅ Updated CI workflow to run tests on all PRs
  • ✅ Added comprehensive testing documentation (TESTING.md)

Test Suites

1. Link Validation (tests/links.test.ts)

  • Validates all internal markdown links resolve to existing files
  • Ensures links don't use .md extensions (VitePress convention)
  • Checks external links use HTTPS (not HTTP)

2. Front Matter Validation (tests/frontmatter.test.ts)

  • Ensures all pages have required title field
  • Validates YAML front matter syntax
  • Checks for reasonable title/description lengths
  • Detects invalid characters in metadata

3. Content Validation (tests/content.test.ts)

  • Validates heading hierarchy (warns about skipped levels)
  • Checks for empty content files (excluding home page)
  • Ensures images use external CDN (https://media.docs.plane.so/)
  • Recommends alt text for images (accessibility)
  • Warns about trailing whitespace

4. Configuration Validation (tests/config.test.ts)

  • Validates VitePress config structure
  • Ensures sidebar links point to existing files
  • Checks for required theme metadata

Usage

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with UI
pnpm test:ui

# Run tests with coverage
pnpm test:coverage

CI Integration

Tests now run automatically on all pull requests alongside:

  • Format checking (pnpm check:format)
  • Build validation (pnpm build)

Documentation

  • TESTING.md: Comprehensive testing guide with examples and troubleshooting
  • README.md: Updated with testing commands and suite overview
  • AGENTS.md: Updated with testing commands for AI agents

Test Results

All 230 tests passing ✅

The test suite provides helpful warnings for:

  • Heading hierarchy issues (9 files)
  • Trailing whitespace (45 files - fixable with formatter)
  • Images without alt text (2 files)
  • Long meta descriptions (2 files)

These warnings help maintain documentation quality without blocking merges for existing content.

Benefits

  1. Quality Assurance: Catch broken links, missing metadata, and structural issues before deployment
  2. Consistency: Enforce consistent formatting and conventions across all documentation
  3. Accessibility: Ensure proper heading hierarchy and image alt text
  4. SEO: Validate metadata for search engine optimization
  5. Developer Experience: Fast feedback loop with automated validation
  6. Maintainability: Prevent documentation drift and broken links as the project grows

Testing Philosophy

  • Strict checks fail the build (broken links, missing metadata, invalid syntax)
  • Warnings provide guidance without blocking (accessibility, formatting suggestions)
  • Fast execution - entire suite runs in under 2 seconds
  • Clear feedback - detailed error messages with file names and line numbers
Open in Web Open in Cursor 

- Add Vitest testing framework with 230+ tests
- Implement link validation tests to verify internal links
- Add front matter validation for metadata consistency
- Create content quality tests for heading hierarchy, images, and structure
- Add VitePress configuration validation
- Update CI workflow to run tests on PRs
- Add test documentation to README and AGENTS.md

Test coverage includes:
- Internal link resolution and validation
- Front matter presence and format
- Content structure and quality
- Image CDN usage and alt text
- VitePress config validation
- Heading hierarchy checks
@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 2, 2026 1:26pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant