Skip to content

Fix test type errors and update to JSR package#217

Merged
rgbkrk merged 1 commit into
mainfrom
fix/test-type-errors
Jul 15, 2025
Merged

Fix test type errors and update to JSR package#217
rgbkrk merged 1 commit into
mainfrom
fix/test-type-errors

Conversation

@rgbkrk

@rgbkrk rgbkrk commented Jul 15, 2025

Copy link
Copy Markdown
Member
  • Import isInlineContainer type guard from @runt/schema
  • Use proper type checking for MediaContainer union types
  • Replace unsafe direct property access with type guard checks
  • Add specific type assertion for known test data structure
  • Update package.json to use jsr:@runt/schema@^0.6.3
  • All 60 tests passing ✅
  • No TypeScript errors ✅

Rationale for type assertion:
The test creates a specific data structure (largeData) and verifies it comes back correctly. The type assertion documents the expected structure that we know we put in, making the test more readable and type-safe than using 'as any'.

- Import isInlineContainer type guard from @runt/schema
- Use proper type checking for MediaContainer union types
- Replace unsafe direct property access with type guard checks
- Add specific type assertion for known test data structure
- Update package.json to use jsr:@runt/schema@^0.6.3
- All 60 tests passing ✅
- No TypeScript errors ✅

Rationale for type assertion:
The test creates a specific data structure (largeData) and verifies
it comes back correctly. The type assertion documents the expected
structure that we know we put in, making the test more readable
and type-safe than using 'as any'.
@rgbkrk
rgbkrk merged commit 93cdf2f into main Jul 15, 2025
1 check passed
@rgbkrk
rgbkrk deleted the fix/test-type-errors branch July 15, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant