Commit 93cdf2f
authored
Fix test type errors and update to JSR package (#217)
- 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'.1 parent 5d5390c commit 93cdf2f
3 files changed
Lines changed: 41 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
263 | 271 | | |
264 | 272 | | |
265 | 273 | | |
| |||
0 commit comments