Closed stealthrabbi closed 3 years ago
Hi! Unfortunately, TestyTs does not have code coverage features yet. I do not think I'll be able to implement this in the short term, but PRs are welcome!
Actually, I managed to quickly whip up an example project with test coverage using NYC.
I'll add the details in the documentation tonight. I will also probably be able to code an integration NYC packaged with TestyTs this week.
Thanks!
EDIT: Here's the example project with instructions on how to use NYC in your own project. https://github.com/Testy/TestyTs/tree/main/examples/code-coverage-nyc
No, thank YOU!. I am fairly new to typescript and was looking for a decent unit test framework that actually let me use classes as opposed to JEST. Mainly, I wanted private helper methods and such, which I don't think JEST supports (e.g. methods to call that I don't want in actual setup/teardown. And, also wanted something that could integrate easily with vscode, and the test Coverage UI adapter for TestyTs helps with that.
Anyways, code coverage was holding me back, so this might be all I need to switch over.
Awesome, I'm glad TestyTs answers your needs! :)
I do not see it in the comamnd line options -- is it possible to get code coverage with the
testyts
runner? I am considering migrating from Jest, where I can dotest jest --coverage
and get a coverage report.