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

Fix #4347 | Ensure root level hooks are called when running in watch mode #4382

Merged
merged 1 commit into from Jul 29, 2020

Conversation

indieisaconcept
Copy link
Contributor

@indieisaconcept indieisaconcept commented Jul 26, 2020

Rationale

Tests with root level hooks are ignored when running in watch mode.
This occurs on initial & subsequent runs.

Description of the Change

  • updated lib/cli/run-watch to re-initialise rootHooks

As we have swapped out the root suite it is necessary to re-initialize
root level hooks again.

  • Extended integration tests for watch to take into consideration
    hooks

Refs

@jsf-clabot
Copy link

jsf-clabot commented Jul 26, 2020

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Jul 26, 2020

Coverage Status

Coverage increased (+0.06%) to 93.994% when pulling 88fd011 on indieisaconcept:issue/4347 into 02bdb6b on mochajs:master.

## Rationale
Tests with root level hooks are ignored when running in watch mode.
This occurs on initial & subsequent runs.

## Changes

- updated `lib/cli/run-watch` to re-initialise rootHooks

As we have swapped out the root suite it is necessary to re-initialize
root level hooks again.

- Extended integration tests for watch to take into consideration
  hooks

## Refs

- mochajs/issues/4347
@indieisaconcept indieisaconcept changed the title Ensure root level hooks are called when running in watch mode Fix 4347 | Ensure root level hooks are called when running in watch mode Jul 27, 2020
@indieisaconcept indieisaconcept changed the title Fix 4347 | Ensure root level hooks are called when running in watch mode Fix #4347 | Ensure root level hooks are called when running in watch mode Jul 27, 2020
@boneskull boneskull added type: bug a defect, confirmed by a maintainer semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Jul 29, 2020
@boneskull boneskull linked an issue Jul 29, 2020 that may be closed by this pull request
2 tasks
Copy link
Member

@boneskull boneskull left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM. I'll see about cutting a release...hopefully.

@boneskull boneskull merged commit edc09bf into mochajs:master Jul 29, 2020
@boneskull boneskull added this to the next milestone Jul 29, 2020
@indieisaconcept
Copy link
Contributor Author

Awesome. Thanks @boneskull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch implementation requires increase of "patch" version number; "bug fixes" type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thrown error in afterEach as a root hook plugin is ignored in watchmode
4 participants