-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript support? #12
Comments
Try specifying something like
Could you confirm whether you're seeing your source files being added like above? |
Also please checkout v0.12.0, before which the |
Hi @laggingreflex I tried again with the 0.12.1 but i seem to be getting a strange error which wasn't happening before. Has some setting changed?
|
Fixed now a3d5c66. Please try again v0.12.2. I did do a major config-parsing refactor recently fe92749 to make it play better with start-mochista, not sure if this is the only bug. I may have to revert it if anything else pops up. Please let me know. |
Hi @laggingreflex I can confirm that the watcher is now working for typescript with version 0.12.2. However i still cant get any coverage for the typescript. I always get "Unknown" like in the image below My scripts can be seen here - https://github.com/el-davo/webpack-react-typescript-boilerplate/blob/feature/mochista/package.json#L16 Am i right in saying this library ignores the nyc settings in package.json? as can be seen here - https://github.com/el-davo/webpack-react-typescript-boilerplate/blob/feature/mochista/package.json#L96 |
I did some fiddling around with it and added .ts and .tsx to this array - https://github.com/laggingreflex/mochista/blob/master/src/istanbul/instrument/index.js#L13 and i get a better looking output now A few observations on this however.
|
It doesn't parse nyc settings from package.json. I've implemented it in this pr: #14 (feel free to pull it and test out) but I'm not sure about it (see #13 (comment)). Use
Test files will automatically be excluded from coverage reports, so you don't need the nyc equivalent of "exclude". |
By default when you remove tests from a test file only that test file will be triggered as "changed". The source file (for which that test file was written) would still has the same instrumentation cached. (similar issue explain in docs) Use the |
Has this been resolved?
Did you try adding those files via the config (mocha.opts/command-line)? |
I've completely re-written this. I've tested it with this forked project and it seems to be working well with typescript: https://github.com/laggingreflex/typescript-react-library It's now no longer a drop-in replacement for Mocha, so it'll need some configuring to make it work, but it should be pretty easy. Just use I'm considering this solved but please feel free to reopen if you find issues or have any questions. |
Hi, I'm just wondering does this work with typescript. I have tried and couldn't seem to get the watcher working with .ts or .tsx files. output is this, basically it doesn't seem to count my files as being changed and the coverage doesn't seem to be output. When i use nyc and mocha directly I can get the coverage for typescript and the watch works
This is my scripts
Awesome module btw 💃
The text was updated successfully, but these errors were encountered: