Skip to content

Commit

Permalink
Reword documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ninevra committed Jul 17, 2020
1 parent c1ac7b3 commit a2b64cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/assertion-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Enforces passing the right number of arguments to assertion methods like `t.is()

Assertion messages are optional arguments that can be given to any assertion call to improve the error message, should the assertion fail.

This rule also attempts to enforce passing the actual and expected values in the correct order. If exactly one of the first two arguments to a two-argument assertion is a static expression such as `{a: 1}`, then this rule requires that the static expression come second. (`t.regex()` and `t.notRegex()` are excluded from this check, because either their `contents` argument or their `regex` argument could plausibly be the actual or expected value.) If the argument to a one-argument assertion is a binary relation such as `'static' === dynamic`, a similar check is performed on its left- and right-hand sides. Errors of these kinds are usually fixable.
This rule also attempts to enforce passing actual values before expected values. If exactly one of the first two arguments to a two-argument assertion is a static expression such as `{a: 1}`, then the static expression must come second. (`t.regex()` and `t.notRegex()` are excluded from this check, because either their `contents` argument or their `regex` argument could plausibly be the actual or expected value.) If the argument to a one-argument assertion is a binary relation such as `'static' === dynamic`, a similar check is performed on its left- and right-hand sides. Errors of these kinds are usually fixable.

## Fail

Expand Down

0 comments on commit a2b64cb

Please sign in to comment.