I wrote some test cases for Typescript typings of the Javascript project.
Positive tests are simple enough; Just enter a bunch of code and it should compile. For example: https://github.com/geon/reselect/blob/d5b46b80a28b08ceebc1f19e4300630a0dea751a/test/typings/should_compile/index.ts
Negative tests are a little more complicated. Some things should not be compiled, but I can no longer have several tests in one file, because compilation will fail while one test file is invalid. So this will not work: https://github.com/geon/reselect/blob/d5b46b80a28b08ceebc1f19e4300630a0dea751a/test/typings/should_not_compile/index.ts
How to ensure that the test passes only if all the files are not compiled?
Tests should probably be run by Travis CI. (With which I have no experience. Sorry.)
No one has answered this question yet.
See related questions: