Add out-of-the-box support for type tests
See original GitHub issueCurrent Behavior
tsdx
allows me to test my code using Jest out of the box. That’s great. But I wish I could test my types as well.
Desired Behavior
Out-of-the-box support for testing types using dtslint
or similar library.
Suggested Solution
- Introduce
dtslint
,ts-expect
or a similar library to alltsdx
templates. - Create a directory for type tests.
- Run type tests when the default test task is run.
Who does this impact? Who is this for?
All users. tsdx
is TypeScript-oriented, and unit-testing types helps preventing accidental breaking changes in these.
Describe alternatives you’ve considered
A guide explaining how one can test their types in a project bootstrapped with tsdx
.
Additional context
- Type tests look somewhat like this.
- Find more in DefinitelyTyped README.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
nx test: Jest unit tests are failing to run in any test that ... - GitHub
Current Behavior An NX - Ionic and Vue workspace fails to run tests, many solutions tested and any seems to fix the issue:...
Read more >Thinking Out of the Box While Testing Software
In this article, learn a few software testing tips that will help you test your application effectively and timely.
Read more >Testing - Spring
This chapter covers Spring's support for integration testing and best practices for unit testing. The Spring team advocates test-driven ...
Read more >Have Testing added to the Deployment Type drop-dow...
Please help in how to do that Request is to have Testing added to the Deployment Type drop-down list on the Hardware Asset...
Read more >React Testing Library
React Testing Library builds on top of DOM Testing Library by adding APIs for working with React components. Projects created with Create React ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@KATT I ended up using
dtslint
.I have a library with working type tests here https://github.com/MrLoh/styled-native-components/blob/master/tests/typings.test.tsx