Force && conditions in expect_true(), expect_false() to be written separatelySource:
For readability of test outputs, testing only one thing per call to
testthat::expect_true() is preferable, i.e.,
expect_true(A); expect_true(B) is better than
expect_true(A && B), and
expect_false(A); expect_false(B) is better than
expect_false(A || B).
TRUEby default. If
FALSE, "named" calls to
stopifnot(), available since R 4.0.0 to provide helpful messages for test failures, are also linted.
Similar reasoning applies to
&& usage inside
linters for a complete list of linters available in lintr.