test: establish centralized test architecture and achieve comprehensive app coverage - #92
Open
ajithakdev wants to merge 2 commits into
Open
ajithakdev wants to merge 2 commits into
ajithakdev wants to merge 2 commits into
Conversation
…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
✅ Deploy Preview for toolglass-by-ajithakdev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…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
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR establishes a centralized, modular test suite architecture in a dedicated
tests/directory (mirroringsrc/), eliminating clutter from the source tree while providing full test coverage across all features of Toolglass.tests/Directory: Keepssrc/100% focused on production code for rapid feature shipping.tests/setup.ts): Added jsdom polyfills (window.matchMedia,scrollIntoView,Element.prototype.animate) and configuredMotionGlobalConfig.skipAnimations = truefor instant, deterministic test execution.tests/test-utils.tsx): Standardized helpers (renderWithProviders,simulateInput,waitAct) to make writing tests for new tools frictionless.CopyButton,Field,ThemeToggle,Toast).Test Results