-
Notifications
You must be signed in to change notification settings - Fork 23
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
cover -x exclude directory not working #28
Comments
Are you excluding something that needs to be transpiled by accident? Maybe try excluding something with a very distinct name, other than |
I also tried with another directory named |
Yeah that is weird, I'm seeing the same problem. I don't know enough about istanbul to know why it would do that. It might be doing some really weird stuff with the excludes. I've always had trouble with Istanbul and exludes/includes in general. I've just learned to structure my code so the built in excludes work. |
The other weird stuff is that the same |
I think the issue is that babel isn't being run on the excluded files. I have my test files in same directory as the app as |
I figured out how to get this to work. A bit of a crude work-around, bit it works. This is what I'm doing now:
verbose: false
instrumentation:
root: ./app
excludes: ["*.spec.js"]
include-all-sources: true
reporting:
reports:
- html
if (/\bin\/_mocha/.test(process.argv[1])) {
require("babel-core/register")({
only: /\.spec\.js$/
});
} else {
require("babel-core/register");
} Both |
The following .istanbul.yml also did the trick for me: verbose: false
instrumentation:
root: ./src/app
excludes: ["**/lib/**"]
include-all-sources: true
reporting:
reports:
- html I discarded this possibility too early because it wasn't clear to me how to turn on the |
Hello,
This works:
babel-node node_modules/.bin/babel-istanbul cover --include-all-sources --root 'src/app' node_modules/.bin/_mocha
While this doesn't:
babel-node node_modules/.bin/babel-istanbul cover --include-all-sources --root 'src/app' -x '**/lib/**' node_modules/.bin/_mocha
It fails with this error:
Do you have any idea what is happening?
The text was updated successfully, but these errors were encountered: