Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Added option to fail if no tests are run #155

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

chrisroush
Copy link

I was having an issue where errors thrown by my test.html would cause mocha tests to not run.
This would cause my CI to report a successful build, perhaps incorrectly.

This PR adds an option failOnNoTests which will cause the task to fail if no tests are run.

@@ -281,7 +283,29 @@ module.exports = function(grunt) {

var stats = helpers.reduceStats(testStats);

if (stats.failures === 0) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm about to make a 1.0 release. It seems reasonable to fail if 0 tests are run, regardless of configuration. If you're not willing to make those changes, I can make them.

@chrisroush
Copy link
Author

Might be nice to have the option, but default to true?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants