When NYC encounters compile errors in Typescript specs, it fails silently, so there's no indication where it got to.
One workaround I've found is to run NYC on specific files, which show the error report for some reason, e.g. nyc mocha src/lib/user.spec.ts
It would be nice to fix this, but it could also be avoided by showing TS errors in spec files in the editor. However, AFAIK in VS Code, for it to show TS compile/lint errors, the .tsconfig.json needs to have included the file, which we don't want for tests, because we don't want them output to dist. They just need to be parsed by the test suite.
Oddly, mocha by itself has no problem with most TS errors, it's just when run through NYC.
When NYC encounters compile errors in Typescript specs, it fails silently, so there's no indication where it got to.
One workaround I've found is to run NYC on specific files, which show the error report for some reason, e.g.
nyc mocha src/lib/user.spec.ts
It would be nice to fix this, but it could also be avoided by showing TS errors in spec files in the editor. However, AFAIK in VS Code, for it to show TS compile/lint errors, the
.tsconfig.json
needs to have included the file, which we don't want for tests, because we don't want them output to dist. They just need to be parsed by the test suite.Oddly, mocha by itself has no problem with most TS errors, it's just when run through NYC.