Skip to content

Commit

Permalink
fix(linter) false positive in jest/no-untyped-mock-factory
Browse files Browse the repository at this point in the history
  • Loading branch information
camc314 committed Aug 23, 2024
1 parent 9068834 commit 9f4a243
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/oxc_linter/src/rules/jest/no_untyped_mock_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl NoUntypedMockFactory {
return;
};

if call_expr.arguments.len() != 2 && (property_name != "mock" || property_name != "doMock")
if call_expr.arguments.len() != 2 || (property_name != "mock" && property_name != "doMock")
{
return;
}
Expand Down Expand Up @@ -277,6 +277,7 @@ fn test() {
",
None,
),
("test.skip('basic', async () => {});", None),
];

let fail = vec![
Expand Down

0 comments on commit 9f4a243

Please sign in to comment.