Description
It should be possible to compile the TypeScript project before tests are run.
We should be able to control TypeScript programmatically. There is a feature to cache some of the compilation work, for faster subsequent compilation runs. We should use this.
As alluded to in #2 we should probably only support configuration files in the project directory itself (next to package.json
files).
I'm not sure where to write the output files. Perhaps just follow the TypeScript configuration. With #2 done that makes it easiest to subsequently load the test files.
I'm not sure how to handle compilation errors. We could just write the files and run the tests. We could also explore an integration with AVA to surface errors better.
This should work automatically with AVA's watch mode, since AVA invokes compilation before every test run.