-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Karma 0.13 ignores included:false pattern #1530
Karma 0.13 ignores included:false pattern #1530
Comments
Thanks for the detailed report I will see what I can find out. There have been a lot of changes in this area so this is probably a simple regression on our side |
- Karma 0.13.X seems to have a regression when it comes to removing files from inclusion which prevents us from using it (see karma-runner/karma#1530). Instead stick to 0.12.X until the issue is resolved.
I have the same problem as well. I would like to use the latest version for testing with ES6 and WebPack, but I still need to run my old ES5 tests and would like to ignore the ES6 files for those tests. Thanks! |
I'm running into this as well using this set of patterns: {
files: [
'**/__tests__/**/*',
{
pattern: 'node_modules/**/__tests__/**/*',
included: false,
watched: false,
served: false
}
]
} |
I'm having the exact same issue with the glob pattern ignoring previously declared patterns that have been defined as not included / not served:
As specified above, login.js is under /src/ and becomes included even though included and served are set to false. Reverting back to 0.12.37 returns to the expected behavior. |
Similar problem with 0.13 here, this pattern previously worked but now does not: 'src/**/!(*scenario).js' i.e. include all .js files except ones containing scenario |
I've been trying to track this down to see whats going on, it appears that in this part var included = this._patterns.filter(function (pattern) {
return pattern.included
})
.map(function (p) {
return from(self.buckets.get(p.pattern) || []).sort(byPath)
}); the map function is not working properly, it returns files that are not included in the filter function. I don't how to proceed next. |
Any update on the proposed fix above? |
I'm having a similar problem. I was not able to get The documentation claims:
I was unable to get a glob like My workaround: var globby = require('globby');
module.exports = function(config) {
config.set({
files: globby.sync([
'./src/**/*.js',
'./test/unit/**/*.js',
'!./src/util/async-listener.js',
'!./src/plugins/resolver.js',
'!./src/options/rc.js'
])
});
}; Use case: I'm using |
@budde377 any chance you could take a look at this? |
@dignifiedquire Yes. I'll get right at it. |
Thanks @budde377 ! |
Do not include a file, when `include=false`. Give `include=false` precedence over `include=true`. Closes karma-runner#1530
Do not include a file, when `include=false`. Give `include=false` precedence over `include=true`. Closes karma-runner#1530
Define specificity of patterns. Let most specific pattern decide to include files or not. Closes karma-runner#1530
Define specificity of patterns. Let most specific pattern decide to include files or not. Closes karma-runner#1530
Hi. In one of my projects Karma started to include files marked with "included:false" in the karma.conf.js after I upgraded to Karma 0.13.3. Switching back to 0.12.37 resolves the issue so either there was a intended behavioral change (either undocumented or breaking some wrong assumptions on my side) or a regression. I reproduced the issue on Windows 10 as well as Ubuntu 15.04.
The karma.conf.js looks something like this:
The worker.js script contains web-worker specific functionality and hence must not be executed directly.
Steps to reproduce:
npm install
npm test
npm install
npm test
Expected: As worker.js should not be included directly its contents should be ignored and the dummy test should pass in both runs of
npm test
Actual: For the first run with Karma 0.13.3 worker.js is included and Karma fails and complains about
someWebworkerSpecificFunction
in worker.js. The second run with Karma 0.12.37 works as expected.As I said. I'm not sure if it's something I'm doing or not but the behavior definitely changed between those two versions.
The text was updated successfully, but these errors were encountered: