Daily GeoGame currently focuses on manual testing and code quality checks. This guide explains how to test your changes before submitting them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/igorek05m/daily-geogame/llms.txt
Use this file to discover all available pages before exploring further.
Testing philosophy
While Daily GeoGame doesn’t have automated tests yet, quality is ensured through:- Manual testing: Playing the game and testing features interactively
- Linting: ESLint catches common errors and enforces code style
- Build validation: TypeScript compiler catches type errors
- Code review: Pull requests are reviewed for quality and correctness
Running the development server
The best way to test your changes is to run the game locally:- Hot module replacement for instant feedback
- Error overlay for debugging
- Fast refresh for component changes
Development workflow
Linting
Run ESLint to catch common issues, enforce code style, and detect potential bugs:- TypeScript type issues
- React best practices and hooks rules
- Next.js specific patterns
- Code style consistency
Fixing lint errors
When you runpnpm lint, you’ll see any issues that need to be fixed:
Build testing
Before submitting a pull request, ensure the production build succeeds:- Compiles TypeScript to JavaScript
- Type-checks all files
- Optimizes the application for production
- Generates static pages and assets
- Reports any build errors or warnings
What to check
Build output details
Build output details
A successful build shows:If the build fails, fix the errors before committing.
Manual testing checklist
When testing your changes, verify these core features still work correctly:Making guesses
- Country autocomplete shows suggestions as you type
- Selecting a country from dropdown works
- Guess appears in the guess list
- Correct guess shows success message
- Incorrect guess shows on map with color gradient
- Duplicate guesses are prevented
Hint progression
- First hint appears immediately
- New hint reveals after each incorrect guess
- Hints display correct data (climate, terrain, GDP, etc.)
- All 6 hints can be revealed
- Last hint shows properly formatted country facts
Map interactions
- Map loads and displays correctly
- Zoom in/out works smoothly
- Pan/drag moves the map
- Guessed countries highlight in color
- Neighboring countries highlight
- Color gradient shows proximity (closer = greener)
- Target country highlights on win
Statistics tracking
- Stats modal opens and closes
- Current streak displays correctly
- Longest streak updates on wins
- Win/loss record increments
- Stats persist between page refreshes
- Session ID is created and stored
Date navigation
- Clicking previous date loads yesterday’s game
- Today’s game is accessible
- Previous game progress is preserved
- Can’t navigate to future dates
- Date display shows correct format
Session persistence
- Refreshing page preserves game state
- Guesses remain after reload
- Hints stay revealed
- Win/loss state persists
- Stats survive browser restart
Responsive design
- Layout works on mobile (< 640px)
- Layout works on tablet (640px - 1024px)
- Layout works on desktop (> 1024px)
- Map is usable on touch devices
- Modals display correctly on all sizes
Areas that need testing
Pay special attention to these areas, which are prone to issues:Map rendering and interactions
Map rendering and interactions
The SVG map is complex and can have issues with:
- Performance on low-end devices
- Touch gestures (pinch-zoom, pan)
- Country highlighting logic
- Color gradient calculations
- Neighbor detection accuracy
Date and timezone handling
Date and timezone handling
Daily games change at midnight UTC:
- Test across different timezones
- Verify correct country for each date
- Check date navigation near midnight
- Ensure consistent game state
Session and state management
Session and state management
Progress is saved locally and synced:
- Test with cookies disabled
- Verify session ID creation
- Check state persistence
- Test multiple browser tabs
- Verify stats synchronization
Country data and hints
Country data and hints
Hints come from external data sources:
- Verify all countries have complete data
- Check for missing or null values
- Test hint formatting and display
- Ensure factbook data is accurate
How to report bugs
If you find a bug while testing, report it on GitHub:Check existing issues
Search existing issues to avoid duplicates.
Create a new issue
If the bug hasn’t been reported, create a new issue with:
- Clear title describing the problem
- Steps to reproduce
- Expected vs actual behavior
- Browser and device information
- Screenshots or video if helpful
Example bug report
Future testing improvements
As the project grows, we plan to add:- Unit tests: For utilities and helper functions
- Integration tests: For API routes and database operations
- E2E tests: For critical user flows
- Visual regression tests: To catch UI changes
- Automated testing: CI/CD pipeline for pull requests