Skip to content

Conversation

@lo1tuma
Copy link
Owner

@lo1tuma lo1tuma commented Jan 22, 2025

Breaking Changes:

  • rule no-skipped-tests has been removed, its functionality has been merged into the existing no-pending-tests rule
  • configuring mocha/additionalCustomNames now only allows to assign a custom name to exactly one interface
  • dropped support for qunit interface
  • rule handle-done-callback: option ignoreSkipped has been renamed to ignorePending
  • rule valid-suite-description: the rule option must always be an object
  • rule valid-test-description: the rule option must always be an object

Features:

  • new setting mocha/interface: when setting this to exports (default is BDD) then mocha function calls are resolved from import statements (e.g. import { it } from 'mocha';)
  • variable references are now tracked, e.g. const foo = it; foo.only('bar', () => {}) is now correctly detected is usage of it.only()

Fixes: #363, #327, #264

@lo1tuma lo1tuma marked this pull request as ready for review January 23, 2025 06:37
@lo1tuma lo1tuma merged commit 4a02c4c into main Jan 23, 2025
8 checks passed
@lo1tuma lo1tuma deleted the rework branch January 23, 2025 12:03

const pattern = new RegExp(stringPattern, 'u');

return { pattern, suiteNames, message };
Copy link

Choose a reason for hiding this comment

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

The documentation still says suiteNames is available, and the changelog for 11.0.0 fails to mention this breaking change.

Copy link
Owner Author

Choose a reason for hiding this comment

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

It is still possible to define custom suiteNames via the plugin settings. It will be respected by all rules, so individual rules don’t have to define this.

Copy link

@SultanWithAGremlin SultanWithAGremlin Jun 4, 2025

Choose a reason for hiding this comment

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

Still it was not mentioned anywhere. As in my project context() is not used in the same way as describe() is, it was excluded from the rule by specifying "describe" as the only key for suiteNames in the rule. By just removing the parameter I now have hundreds of warnings for that.
Simply removing this feature without mentioning it is quite annoying, as the plugin settings just allow for additionalCustomNames but not skipping existing one as possible before.

@khitrenovich
Copy link

  • rule no-skipped-tests has been removed, its functionality has been merged into the existing no-pending-tests rule

It would be great to have this documented somewhere. I've opened #403 about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no-empty-description does not detected when in the same line happens also the no-exclusive-tests

6 participants