Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

new rule: unneeded mocha done #179

Closed
HamletDRC opened this issue Jul 14, 2016 · 1 comment
Closed

new rule: unneeded mocha done #179

HamletDRC opened this issue Jul 14, 2016 · 1 comment
Milestone

Comments

@HamletDRC
Copy link
Member

If an it/describe/before/after function takes a MochaDone parameter, then it should really be needed.

Create a violation if:

  • a mocha lifecycle function declares a mocha done parameter
  • the done parameter never escapes the method (as a parameter to a function, for example)
  • the done object is only invoked once as the last line of the function
@michalzubkowicz
Copy link

Isn't it causing false positive when async/await is used?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants