This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Ignore Array.forEach in mocha-no-side-effect-code #545
Labels
Difficulty: Medium
People with non-trivial experience in TSLint should be able to send a pull request for this issue.
Status: Accepting PRs
Type: Rule Feature
Adding a feature to an existing rule.
Milestone
When I write parameterized tests, I use this style of code:
This ends up creating and running three tests:
But, if the
mocha-no-side-effect-code
rule is enabled, this is flagged as an error because the rule treatsArray.forEach
as having side effects.This could be ignored using the
ignore
option with something like"\.forEach\("
, but I think this is something the rule should just handle in the first place.The text was updated successfully, but these errors were encountered: