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

feat: make mocha fail if it encounters 0 tests #5981

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

maribethb
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Proposed Changes

If mocha encounters 0 tests, it fails

Behavior Before Change

If mocha encounters 0 tests, it reports 0 failures and CI passes

Behavior After Change

If mocha encounters 0 tests, it says 1 tests failed now and fails CI.

Reason for Changes

Catches scenarios where somehow mocha configuration is broken, no tests are run, and we are blissfully unaware since CI reports no problems.

Test Coverage

Tested via commenting out all of the goog.require lines on index.html so none of the tests are imported. The browser shows 0 tests running, but the command line reports the 1 failure as expected.

Documentation

n/a

Additional Information

n/a

@maribethb maribethb requested a review from a team as a code owner March 5, 2022 01:16
@maribethb maribethb requested a review from alschmiedt March 5, 2022 01:16
@cpcallen
Copy link
Contributor

Can this go in now? I think it just needs to have the develop branch merged in, since #5982 has been merged.

@maribethb maribethb merged commit 0b2bf3a into google:develop Mar 17, 2022
@maribethb maribethb deleted the mocha_flag branch April 1, 2022 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants