Browser usage issues with delay
option
#4341
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There seem to be 2 issues currently with the
delay
option in the browser usage.mocha.setup({delay: false})
actually enables the delay - this is becausedelay
does not work with an argument.ui
beforedelay
does not apply the delay (see issue).This fix runs
delay
flag separately to the others.Alternative designs
Could update
delay
to work with an argument. Thought it was slightly better to apply a fix just to the browser-based code. Also that would not have been enough to fix the issue with the ordering.Could not see a way to get it to work like the CLI as mocha handles options differently for cli + browser (e.g. whats available for the constructor).
Possible Drawbacks
Currently no HTML reporter tests so is currently not covered.
Looking for recommendations.
Applicable issues
#1799