Skip to content

v0.0.5: Comprehensive Test Suite

Choose a tag to compare

@mdrv mdrv released this 17 Jan 08:13
· 4 commits to main since this release

πŸ§ͺ Major Update: Comprehensive Test Suite

This release adds a robust test infrastructure and fixes routing bugs discovered during testing.

✨ Highlights

  • 67+ passing tests covering all core functionality
  • 98.5% success rate with <2 second execution time
  • 2 routing bugs fixed that were discovered during testing
  • New testing documentation page
  • 80%+ code coverage on utility functions

πŸ§ͺ Test Infrastructure

  • Test Runner: Vitest with happy-dom
  • Test Types: Unit tests (integration tests planned)
  • Execution Time: ~1 second for full suite
  • Coverage Tool: Built-in v8 coverage

πŸ› Bugs Fixed

  1. Wildcard route priority - Routes like /* now properly sort to end of route list
  2. Wildcard path resolution - Wildcard routes now correctly match URLs
  3. Test spy cleanup - Console spies no longer interfere across tests

πŸ“š Test Coverage

  • βœ… Route matching and parameter extraction
  • βœ… Path utilities (join, constructPath, isActive)
  • βœ… Component resolution (lazy and eager loading)
  • βœ… Route validation and priority sorting
  • βœ… Location handling and navigation
  • βœ… Layout collection and hook configuration

πŸ“– Documentation

  • Added /docs/testing page with full test documentation
  • Updated README with testing section
  • Created OpenSpec testing infrastructure spec
  • Documented testing best practices

πŸš€ Running Tests

# Run all tests
bun run test:run

# Watch mode
bun run test

# With coverage
bun run test:coverage

πŸ”„ Migration Guide

No breaking changes - this release is fully backward compatible. No migration needed.

πŸ“¦ What's Next

  • Integration tests for complete routing flows
  • Continuous integration (GitHub Actions)
  • Additional edge case coverage
  • E2E tests (optional future enhancement)

Full Changelog: v0.0.2...v0.0.5