issue-22.js 336 B

123456789101112131415161718
  1. return_with_no_value_in_if_body: {
  2. options = { conditionals: true };
  3. input: {
  4. function foo(bar) {
  5. if (bar) {
  6. return;
  7. } else {
  8. return 1;
  9. }
  10. }
  11. }
  12. expect: {
  13. function foo (bar) {
  14. return bar ? void 0 : 1;
  15. }
  16. }
  17. }