Mocha 8.3.1 breaks ability to add configuration to tail of it
blocks
#4598
Labels
type: bug
a defect, confirmed by a maintainer
it
blocks
#4598
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
In a few places in our codebases we configured
retries
andtimeout
using the following syntax:In #4574 helpers like
it()
are refactored, such that they're wrapped in a closure and no longer have the attributes.retries()
,.timeout()
, etc.Steps to Reproduce
Use mocha
8.3.1
to run the following block:Expected behavior: [What you expect to happen]
Settings can be chained on to
it
block.Actual behavior: [What actually happens]
Exception occurs.
Reproduces how often: [What percentage of the time does it reproduce?]
Always happens.
Versions
Mocha 8.3.1.
Additional Information
One potential patch is returning the result of
it.apply
in the new closures that have been introduced.The text was updated successfully, but these errors were encountered: