Y
Hacker News
new
|
ask
|
show
|
jobs
by
andyferris
1460 days ago
I use @ts-expect-error for testing the negative case, but if there was a practical way of testing the actual error reported that would be wonderful.
1 comments
arpakuutio
1460 days ago
My solution to this was to run tsc from Jest tests and do snapshot tests for the error messages
https://github.com/noppa/get-optional/tree/master/tests/typi...
link
https://github.com/noppa/get-optional/tree/master/tests/typi...