4 Commits

Author SHA1 Message Date
Fatih Kadir Akın
8868146ff0 refactor(vitest.setup): update useSearchParams function to return new URLSearchParams 2026-01-07 12:08:26 +03:00
Claude
48870c72ad fix(tests): suppress expected console output during tests
Mock console.error and console.log in test setup to prevent
noisy stderr output from error handling tests. The error
messages were expected behavior being tested, not actual failures.
2026-01-07 08:58:45 +00:00
copilot-swe-agent[bot]
1c71a2fb6f fix: improve test coverage and mock implementations
- Add assertion for original property in variable detection test
- Clarify test descriptions for HTML-like patterns and programming keywords
- Add edge cases for consecutive special characters in variable names
- Add username validation assertion in register test
- Improve useSearchParams mock to return ReadonlyURLSearchParams
- Improve cookies mock with proper return values
- Remove unused originalNavigator variable

Co-authored-by: f <196477+f@users.noreply.github.com>
2026-01-07 08:10:58 +00:00
Claude
0ce1a0e35d feat(testing): implement vitest test suite
Add comprehensive testing infrastructure with vitest, React Testing
Library, and jsdom. Includes tests for:

- Utility functions (cn, isChromeBrowser, date formatting, JSON utils)
- Variable detection module (7 pattern types, conversion, false positives)
- API routes (health check, user registration with validation/auth)

127 tests passing covering critical functionality.
2026-01-06 18:52:06 +00:00