Do not fail when the test set is empty
See original GitHub issueKarma fails if there are no matching tests. Shouldn’t it just skip tests if there are none? If not the default, than I think this should be configureable.
I realize you may ask “why are you running karma if you have no tests?” but it’s common to run karma along with a bunch of other tasks in grunt. If there are no matching tests, the whole task fails.
› ./node_modules/karma/bin/karma start
INFO [karma]: Karma v0.10.9 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
WARN [watcher]: Pattern "/Users/mhughes/foo/src/test/js/**/**.js" does not match any file.
INFO [Firefox 27.0.0 (Mac OS X 10.9)]: Connected on socket rreoh8Sf1OuByCl2ZRyZ
INFO [Chrome 32.0.1700 (Mac OS X 10.9.1)]: Connected on socket 0nvZF76Y3Aay8m1-ZRya
Firefox 27.0.0 (Mac OS X 10.9) LOG: 'Tests loaded, ready to run.'
Firefox 27.0.0 (Mac OS X 10.9): Executed 0 of 0 SUCCESS (0 secs / 0 secs)
Chrome 32.0.1700 (Mac OS X 10.9.1) LOG: 'Tests loaded, ready to run.'
Firefox 27.0.0 (Mac OS X 10.9): Executed 0 of 0 ERROR (0.057 secs / 0 secs)
Firefox 27.0.0 (Mac OS X 10.9): Executed 0 of 0 ERROR (0.057 secs / 0 secs)
Chrome 32.0.1700 (Mac OS X 10.9.1): Executed 0 of 0 ERROR (0.283 secs / 0 secs)
Issue Analytics
- State:
- Created 10 years ago
- Reactions:2
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Fail On Empty Test Suite
A module is considered empty if no tests are executed regardless of whether tests are defined. This is useful to catch scenarios were...
Read more >How to ignore empty test files in Jest from throwing error
Your best bet is to set those test to be skipped as todos. An example of an empty test that passes without problem...
Read more >Using matchers
This TestFailedException will cause the test to fail. Trait must.Matchers is an alternative to should.Matchers that provides the exact same meaning, syntax, ...
Read more >How to test if a parameter has been set to the empty string?
When the parameter is not set, the test should fail. Why does the following not succeed? $ unset aa $ if [ ${aa}==" ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dignifiedquire what version of Karma was this fix included in? I’m using 0.13.19 and the config setting seems to be ignored:
@adambuczynski This was committed on Jan 11 and the latest release (0.13.19) is from Jan 6, so the the feature hasn’t been released yet.