Skip to content

Conversation

@AugustinMauroy
Copy link
Member

Description

Adding tests for :

  • "addon-verify"
  • "llms-txt"
  • "man-page"
  • "metada"
  • "orama-db"
  • "web"

plus excluding test form being count in test coverage

Related Issues

Close #491

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

Copilot AI review requested due to automatic review settings December 13, 2025 11:35
@AugustinMauroy AugustinMauroy requested a review from a team as a code owner December 13, 2025 11:35
@vercel
Copy link

vercel bot commented Dec 13, 2025

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

Project Deployment Review Updated (UTC)
api-docs-tooling Ready Ready Preview Dec 15, 2025 10:47am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive test coverage for six generators (addon-verify, llms-txt, man-page, metadata, orama-db, and web) and excludes test files from code coverage reports by adding **/*.test.mjs to the .c8rc.json exclusion list.

Key Changes

  • Added test files for addon-verify, llms-txt, man-page, metadata (parse and index), orama-db, and web/utils
  • Updated .c8rc.json to exclude test files from coverage calculation
  • Tests cover both successful generation scenarios and error handling

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.c8rc.json Excludes test files from coverage reports
src/generators/addon-verify/__tests__/index.test.mjs Tests addon verification, file generation, and error cases
src/generators/llms-txt/__tests__/index.test.mjs Tests LLM text generation and file output
src/generators/man-page/__tests__/index.test.mjs Tests man page generation with options and environment variables
src/generators/metadata/__tests__/index.test.mjs Tests async streaming metadata generation
src/generators/metadata/__tests__/parse.test.mjs Tests API doc parsing, link conversion, and transformations
src/generators/orama-db/__tests__/generate.test.mjs Tests database generation with proper cleanup
src/generators/web/utils/__tests__/utils.test.mjs Tests chunked require, import declarations, and CSS plugin

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

❌ Patch coverage is 92.05298% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.55%. Comparing base (b2181a2) to head (4072e89).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/generators/web/utils/processing.mjs 90.12% 8 Missing ⚠️
bin/cli.mjs 94.33% 3 Missing ⚠️
src/generators/web/index.mjs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #519      +/-   ##
==========================================
+ Coverage   80.58%   87.55%   +6.96%     
==========================================
  Files         119       91      -28     
  Lines       11906     8253    -3653     
  Branches      841      653     -188     
==========================================
- Hits         9595     7226    -2369     
+ Misses       2308     1022    -1286     
- Partials        3        5       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AugustinMauroy AugustinMauroy changed the title Augustin/better testing test: improve test coverage Dec 13, 2025
AugustinMauroy and others added 2 commits December 13, 2025 19:09
Co-Authored-By: Aviv Keller <[email protected]>
@avivkeller avivkeller linked an issue Dec 13, 2025 that may be closed by this pull request
4 tasks
@github-actions
Copy link

Web Generator

File Base Head Diff
styles.css 118.37 KB 118.30 KB -67.00 B (-0.06%)

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.

Tests for metadata generator Increase Code Coverage to 90%

3 participants