Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a1b1aa9

Browse files
authoredJul 21, 2021
refactor(no-unnecessary-act): simplify checkNoUnnecessaryActFromBlockStatement's shouldBeReported assigning (#427)
1 parent 840763d commit a1b1aa9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎lib/rules/no-unnecessary-act.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
144144
}
145145

146146
const shouldBeReported = isStrict
147-
? (hasSomeNonTestingLibraryCall(blockStatementNode.body) &&
148-
hasTestingLibraryCall(blockStatementNode.body)) ||
149-
!hasSomeNonTestingLibraryCall(blockStatementNode.body)
147+
? hasTestingLibraryCall(blockStatementNode.body)
150148
: !hasSomeNonTestingLibraryCall(blockStatementNode.body);
151149

152150
if (shouldBeReported) {

0 commit comments

Comments
 (0)
Please sign in to comment.