Skip to content

Commit

Permalink
chore: add a fixer test case
Browse files Browse the repository at this point in the history
  • Loading branch information
shulaoda committed Oct 17, 2024
1 parent c77d635 commit 395b237
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/oxc_linter/src/rules/eslint/no_else_return.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ fn test() {
];

let fix = vec![
("if(0)return;else r", "if(0)return; r", None),
("function foo1() { if (true) { return x; } else { return y; } }", "function foo1() { if (true) { return x; } return y; }", None),
("function foo1() { if(true){ return x; }else{ return y; } }", "function foo1() { if(true){ return x; } return y; }", None),
("function foo2() { if (true) { var x = bar; return x; } else { var y = baz; return y; } }", "function foo2() { if (true) { var x = bar; return x; } var y = baz; return y; }", None),
Expand Down

0 comments on commit 395b237

Please sign in to comment.