Skip to content

test: establish centralized test architecture and achieve comprehensive app coverage - #92

Open
ajithakdev wants to merge 2 commits into
mainfrom
test/comprehensive-app-coverage
Open

ajithakdev wants to merge 2 commits into
mainfrom
test/comprehensive-app-coverage

Conversation

@ajithakdev

@ajithakdev ajithakdev commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR establishes a centralized, modular test suite architecture in a dedicated tests/ directory (mirroring src/), eliminating clutter from the source tree while providing full test coverage across all features of Toolglass.

  • Centralized tests/ Directory: Keeps src/ 100% focused on production code for rapid feature shipping.
  • Central Setup (tests/setup.ts): Added jsdom polyfills (window.matchMedia, scrollIntoView, Element.prototype.animate) and configured MotionGlobalConfig.skipAnimations = true for instant, deterministic test execution.
  • Shared Utilities (tests/test-utils.tsx): Standardized helpers (renderWithProviders, simulateInput, waitAct) to make writing tests for new tools frictionless.
  • Full Coverage: Added comprehensive test coverage for all 17 tools, custom hooks, top-level pages, dialogs/navigation, and UI primitives (CopyButton, Field, ThemeToggle, Toast).

Test Results

  • 35 / 35 test files passed (100%)
  • 159 / 159 tests passed (100%)
  • 84.11% overall line coverage (UI components: 93.8%, Hooks: 96.5%, Pages: 96.2%, Tools: 85%+)
  • ESLint: 0 errors, 0 warnings
  • Build: Passes cleanly in ~600ms

Devin Review

…ve app coverage

- Centralize test suite into dedicated tests/ directory mirroring src/
- Add tests/setup.ts with jsdom polyfills (matchMedia, animate, scrollIntoView) and instant Framer Motion execution
- Add reusable test utilities in tests/test-utils.tsx (renderWithProviders, simulateInput, waitAct)
- Cover all 17 tools, custom hooks, pages, components, and UI building blocks
- Reach 159 passing unit tests across 35 test files and 84%+ line coverage
@netlify

netlify Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for toolglass-by-ajithakdev ready!

Name Link
🔨 Latest commit e068c4f
🔍 Latest deploy log https://app.netlify.com/projects/toolglass-by-ajithakdev/deploys/6a9da86fded9040008a641dd
😎 Deploy Preview https://deploy-preview-92--toolglass-by-ajithakdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

devin-ai-integration[bot]

This comment was marked as resolved.

…d timing

- Add src/**/*.test.{ts,tsx} to vite.config.ts include so source-adjacent tests are never omitted
- Update CONTRIBUTING.md testing section to reflect tests/ layout while documenting source-adjacent support
- Replace fixed 3100ms sleep in Toast.test.tsx with deterministic callback trigger
- Add condition-based waitFor helper to tests/test-utils.tsx
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

This branch has not been deployed

No deployments
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