Skip to content
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 1.6 first-matcher (file-list fix) update is hard to debug #2675

Open
steveworkman opened this issue Apr 24, 2017 · 3 comments
Open

Karma 1.6 first-matcher (file-list fix) update is hard to debug #2675

steveworkman opened this issue Apr 24, 2017 · 3 comments

Comments

@steveworkman
Copy link

steveworkman commented Apr 24, 2017

Expected behaviour

Matchers in the matchers list bring back files according to their pattern. When the file is the first one in the list, it should be brough back.

Actual behaviour

Since 1.6 with this change for file-list some of my files aren't returned

Environment Details

OS X 10.11, PhantomJS browser

  • Karma version (output of karma --version): 1.6
  • Relevant part of your karma.config.js file

V1.5 (working)
// list of files / patterns to load in the browser

files: [
	{pattern: (min ? 'min/' : '') + 'modules/**/*.js',		included: false},
	{pattern: 'modules/**/*.test.js',					included: false},
	{pattern: 'resources/karma.preconf.js',			included: true},
	{pattern: (min ? 'min/' : '') + 'core.js',				included: true},
	'libs/jquery.js', // Must be included before jasmine-jquery or it doesn't work
	{pattern: 'resources/vendor/*.js'},
	{pattern: 'resources/karma.main.js',				included: true},
	{pattern: 'modules/**/tests/fixtures/*.html',			included: false}
],

Output:

Running "karma:desktop" (karma) task
24 04 2017 15:50:01.090:INFO [karma]: Karma v1.5.0 server started at http://0.0.0.0:9876/

v1.6 (not working)

// list of files / patterns to load in the browser
files: [
	'libs/jquery.js', // Must be included before jasmine-jquery or it doesn't work
	{pattern: (min ? 'min/' : '') + 'modules/**/*.js',		included: false},
	{pattern: 'modules/**/*.test.js',					included: false},
	{pattern: 'resources/karma.preconf.js',			included: true},
	{pattern: (min ? 'min/' : '') + 'core.js',				included: true},
	{pattern: 'resources/vendor/*.js'},
	{pattern: 'resources/karma.main.js',				included: true},
	{pattern: 'modules/**/tests/fixtures/*.html',			included: false}
],

Output:

Running "karma:desktop" (karma) task
24 04 2017 15:46:59.168:WARN [watcher]: All files matched by "/...../yelldotcom/src/main/ftl/default/_yframe/libs/jquery.js" were excluded or matched by prior matchers.
24 04 2017 15:46:59.170:WARN [watcher]: All files matched by "/...../yelldotcom/src/main/ftl/default/_yframe/modules/**/*.test.js" were excluded or matched by prior matchers.
24 04 2017 15:47:01.898:INFO [karma]: Karma v1.6.0 server started at http://0.0.0.0:9876/

Part of the problem here is that I have no idea how to find out what matcher is matching this. It would be really helpful if the warning could list out the matchers that it was matched for so that I can re-order it or change those matchers.

Steps to reproduce the behaviour

@steveworkman steveworkman changed the title Karma 1.6 first-matcher update is hard to debug Karma 1.6 first-matcher (file-list fix) update is hard to debug Apr 24, 2017
@clintonb
Copy link

clintonb commented May 3, 2017

I have the same issue. This might be related to the changes in #2620. My attempts to install the package from the repo, with the commits before this one, fail due to static/karma.js being absent.

clintonb pushed a commit to openedx-unsupported/ecommerce that referenced this issue May 3, 2017
In addition to updating the dependencies, I have removed the usage of semver modifiers. This is the second time (that I recall) these floating dependencies have been the source of broken tests on Travis, but not locally. In this case karma 1.6.0 is broken due to the issue described at karma-runner/karma#2675.
clintonb pushed a commit to openedx-unsupported/ecommerce that referenced this issue May 3, 2017
In addition to updating the dependencies, I have removed the usage of semver modifiers. This is the second time (that I recall) these floating dependencies have been the source of broken tests on Travis, but not locally. In this case karma 1.6.0 is broken due to the issue described at karma-runner/karma#2675.
clintonb pushed a commit to openedx-unsupported/ecommerce that referenced this issue May 3, 2017
In addition to updating the dependencies, I have removed the usage of semver modifiers. This is the second time (that I recall) these floating dependencies have been the source of broken tests on Travis, but not locally. In this case karma 1.6.0 is broken due to the issue described at karma-runner/karma#2675.
@maksimr
Copy link
Contributor

maksimr commented May 3, 2017

@clintonb @steveworkman could you create repository or gist which reproduce the problem?
It will be very valuable

Thanks

@clintonb
Copy link

clintonb commented May 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants