-
Notifications
You must be signed in to change notification settings - Fork 136
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
How to Exclude a folder with typeScript from karma & coverage. #221
Comments
I am AFK this weekend. I don't know if there is a better way than modifying
the regexp in src/test.ts (const context).
You could ask on the Ng-cli repo.
…On Fri, 3 Feb 2017 at 23:00, Javi ***@***.***> wrote:
Hi guys, Do you know how to Exclude some folder with TypeScripts from
karma & coverage?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#221>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG5tSG8i_Z9t--R6zfNysZDgkO-B9mgXks5rYxbZgaJpZM4L2P95>
.
|
I added this inside
You can modify the regex to match the path of the folders you want to exclude. |
thanks a lot @lathonez and @emmanuelroussel. Do you know how to exclude two different paths with regex ?? I need to exclude /src/(mocks.ts|test.ts|polyfills.ts)/ and two new files (api.ts and CompanyApi.ts) from src/app/common/api/ path. Thanks a lot for your help!! |
I think you can simply add the rest of the path of
It gets a bit ugly, but it should work. |
@lathonez would like me to make a PR to exclude test config files from test coverage by default? |
@emmanuelroussel - I would, but it should be a PR to ng-cli not to us: |
@filipesilva provided a new syntax for the "test": {
"codeCoverage": {
"exclude": [
"src/polyfills.ts",
"**/test.ts"
]
},
"karma": {
"config": "./karma.conf.js"
}
}, |
@1M0reBug awesome, thanks for the reference. Reopening to track merging the upstream change. |
Hi, do you know how to Exclude a folder that contains TypeScripts from karma coverage?
The text was updated successfully, but these errors were encountered: