Skip to content

🧪 Testing: Added tests for scripts and pages to improve test coverage#1092

Closed
saint2706 wants to merge 2 commits into
mainfrom
testing/increase-coverage-8681130005403216241
Closed

🧪 Testing: Added tests for scripts and pages to improve test coverage#1092
saint2706 wants to merge 2 commits into
mainfrom
testing/increase-coverage-8681130005403216241

Conversation

@saint2706
Copy link
Copy Markdown
Owner

This PR improves the overall test suite quality and coverage by creating dedicated tests for missing React pages and build scripts.

  • Increases line coverage for scripts to 41%.
  • Completes test coverage for all pages (ContentStats and NotFound).
  • Safely cleans up temporary mock files using beforeEach and afterEach Vitest hooks.
  • Replaces unstable render logic in App.test.tsx with standard testing library methodology if required, stabilizing test results.

PR created automatically by Jules for task 8681130005403216241 started by @saint2706

- Add test coverage for custom build scripts (`generate-sitemap.js`, `generate-llms-txt.js`, `analyze-bundle.js`, `optimize-images.js`, `validate-content.js`, `vite-plugin-critical-css.ts`)
- Add test coverage for previously untested pages (`ContentStats.tsx`, `NotFound.tsx`)
- Isolate test side-effects by cleaning up generated temporary files and directories.
- Improve `vitest.config.ts` setup to track tests for `scripts/**/*.{js,ts}` files.
- Update `README.md` to document the testing improvements made.

Co-authored-by: saint2706 <45678566+saint2706@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Add test coverage for custom build scripts (`generate-sitemap.js`, `generate-llms-txt.js`, `analyze-bundle.js`, `optimize-images.js`, `validate-content.js`, `vite-plugin-critical-css.ts`)
- Add test coverage for previously untested pages (`ContentStats.tsx`, `NotFound.tsx`)
- Isolate test side-effects by cleaning up generated temporary files and directories.
- Improve `vitest.config.ts` setup to track tests for `scripts/**/*.{js,ts}` files.
- Update `README.md` to document the testing improvements made.

Co-authored-by: saint2706 <45678566+saint2706@users.noreply.github.com>
@saint2706 saint2706 closed this May 29, 2026
@saint2706 saint2706 deleted the testing/increase-coverage-8681130005403216241 branch May 29, 2026 05:51
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