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

Mocha constructor: some fixes and cleanup #4004

Merged
merged 4 commits into from Sep 22, 2019
Merged

Conversation

juergba
Copy link
Member

@juergba juergba commented Aug 28, 2019

Description

When Mocha is launched via CLI a whole bunch of options is dumped into the mocha instance, like canonical / canonical camel-cased / alias / alias camel-cased versions of option names. This is prone to errors, but not part of this PR ==> see #4011.

When the user manually calls the Mocha constructor, there are some bugs to be fixed.
Furthermore we remove two deprecated options.

Description of the Change

  • remove deprecated enableTimeouts option
  • remove deprecated useColors option
  • remove ignoreLeaks option: this option does not exist and is redundant to checkLeaks
  • fix inlineDiffs option: useInlineDiffs does not exist
  • fix diff option: hideDiff does not exist
  • fix reporterOption option: its alias reporterOptions was processed instead
  • fix fullTrace: fullStackTrace does not exist
  • cleanup global option: no alias processing

This is a breaking change.

@juergba juergba added type: bug a defect, confirmed by a maintainer semver-major implementation requires increase of "major" version number; "breaking changes" labels Aug 28, 2019
@coveralls
Copy link

coveralls commented Aug 28, 2019

Coverage Status

Coverage increased (+0.2%) to 92.664% when pulling 32d0106 on juergba/mocha-constructor into 6ec07d6 on master.

@juergba juergba force-pushed the juergba/mocha-constructor branch 4 times, most recently from 2068424 to 897b917 Compare August 30, 2019 13:06
@juergba juergba marked this pull request as ready for review August 30, 2019 13:42
@juergba juergba self-assigned this Aug 30, 2019
@juergba
Copy link
Member Author

juergba commented Sep 20, 2019

I will merge this PR within the next few days.

Copy link
Contributor

@craigtaub craigtaub left a comment

Choose a reason for hiding this comment

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

All LGTM, think missing doc updates tho.

lib/mocha.js Show resolved Hide resolved
lib/mocha.js Show resolved Hide resolved
Copy link
Contributor

@craigtaub craigtaub left a comment

Choose a reason for hiding this comment

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

LGTM

@juergba juergba merged commit eed38d7 into master Sep 22, 2019
@juergba juergba deleted the juergba/mocha-constructor branch September 22, 2019 06:56
@juergba juergba added this to the next milestone Sep 22, 2019
@juergba juergba modified the milestones: 6.2.1, 7.0.0 Oct 18, 2019
holm pushed a commit to peakon/mocha that referenced this pull request Jan 14, 2020
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK.

This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
holm pushed a commit to peakon/mocha that referenced this pull request Jan 19, 2020
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK.

This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
holm pushed a commit to peakon/mocha that referenced this pull request Jan 19, 2020
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK.

This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
holm pushed a commit to peakon/mocha that referenced this pull request Jan 20, 2020
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK.

This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major implementation requires increase of "major" version number; "breaking changes" type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants