Skip to content

v1.1.0 - Event Type Field & Test Suite

Choose a tag to compare

@paladini paladini released this 12 Dec 21:05
· 28 commits to main since this release

✨ Added

  • Event Type Field: Added type field to Event interface to allow reliable differentiation between event types (Run, Ride, Swim, Strength, etc.)
  • Comprehensive Test Suite: Added complete unit test coverage for all endpoints with fixtures
    • 49 tests covering Athletes, Events, Wellness, Workouts, and Activities
    • Separate fixtures for maintainable test data
    • Tests for error handling and rate limiting
  • Documentation: Added documentation for filtering events by type in README

🔄 Changed

  • Improved event filtering examples in documentation to use the new type field instead of name-based pattern matching

💡 Why This Matters

The type field enables reliable event classification without depending on fragile name patterns:

// ✅ Reliable - Uses type field
const runEvents = events.filter(event => event.type === 'Run');

// ❌ Fragile - Pattern matching on names
const runEvents = events.filter(event => event.name?.includes('run'));

Benefits:

  • Language-agnostic (works with any locale)
  • Type-safe and reliable
  • More maintainable code

📦 Installation

npm install intervals-icu@1.1.0

🔗 Links