Commit 65c6ce8
authored
Add type compiler validation tests for TrackUserProtection (JhaSourav07#3001)
The TrackUserProtection class had no type-level tests verifying its
return types, method signatures, or validation schema constraints.
This made it easy to accidentally change the shape of return values
or allow invalid reason strings during refactors.
Add five type-level tests using expectTypeOf to pin down:
- The return type shape of verifyAndDeduplicate
- Method parameter and return types
- The singleton getInstance return type
- That invalid string literals are blocked for the reason field
- That schema validation returns a strict, stable report type
Co-authored-by: atul-upadhyay-7 <atul-upadhyay-7@users.noreply.github.com>1 parent f983222 commit 65c6ce8
1 file changed
Lines changed: 44 additions & 0 deletions
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments