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

Support function calls as custom names (to stop false warnings) #336

Merged

Commits on Sep 17, 2023

  1. Support call expressions as suites for no-sibling-hooks

    In particular:
      * mocha-each style `forEach` prefix now does not have an error reported on its nested hooks,
      * additional custom names chained off describe/context can work, in line with how .only and .skip work,
      * the combination of the above, where there is a function call chained directly off describe/context.
    scottmcginness committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    8c1d16b View commit details
    Browse the repository at this point in the history
  2. Change to use parentheses in names

    This way is slightly more explicit and allows top-level to distinguish between the call of the custom function and the call of the function that's returned.
    For example, forEach([1, 2, 3]).describe fails the max-top-level-suites rule if it contained more than one nested suite.
    Updates tests to match the new setting names.
    Add more tests to guard against regressions (some of these were already supported, such as dotted properties, but not explicitly so).
    scottmcginness committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    846fe5b View commit details
    Browse the repository at this point in the history
  3. Add more documentation for custom names

    Link to mocha-each as an example for custom naming.
    Add examples of the kinds of names that may be added.
    scottmcginness committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    05ebe3b View commit details
    Browse the repository at this point in the history
  4. Lint the docs

    scottmcginness committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    3437410 View commit details
    Browse the repository at this point in the history