What problem does it solve?
This Skill helps you remove brittle TypeScript as assertions in tests by migrating to type-safe partial data using @total-typescript/shoehorn, so your tests stay correct and maintainable.
Core Features & Use Cases
- Migrates test data typing: Replaces
as Type with fromPartial() for partial objects that should still be type-compatible.
- Supports intentionally wrong inputs: Converts
as unknown as Type patterns to fromAny() when you need to preserve autocomplete while feeding invalid data for negative/error-path tests.
- Guides safe test-only adoption: Emphasizes that shoehorn should be used only in test code and provides a clear workflow for updating code and re-running type checks.
- Real-world example: You have large request objects in tests where you only care about
body.id, and you want to avoid faking 20+ unrelated properties just to satisfy the compiler.
Quick Start
Ask the Skill to migrate your TypeScript test files by replacing as Type assertions with fromPartial() (and as unknown as Type with fromAny()), then verify with a type check.