Skip to content

Commit

Permalink
fix: @putout/minify: ternary, assign (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jun 9, 2024
1 parent 640bf64 commit be6c4ea
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixture/assign-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for(let e of l)e.o=w(e.o),e.l=w(e.l);
1 change: 1 addition & 0 deletions test/fixture/assign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for(let e of l)(e.o=w(e.o)),(e.l=w(e.l));
1 change: 1 addition & 0 deletions test/fixture/ternary-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export var s=()=>a?(p(),i):2;
1 change: 1 addition & 0 deletions test/fixture/ternary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const s = () => a ? (p(),i) : 2
10 changes: 10 additions & 0 deletions test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ test('@putout/minify: arrow', (t) => {
t.end();
});

test('@putout/minify: assign', (t) => {
t.minify('assign');
t.end();
});

test('@putout/minify: apply-optional-chainig', (t) => {
t.minify('apply-optional-chaining');
t.end();
Expand Down Expand Up @@ -284,6 +289,11 @@ test('@putout/minify: sequence-expressions', (t) => {
t.end();
});

test('@putout/minify: ternary', (t) => {
t.minify('ternary');
t.end();
});

test('@putout/minify: overlap', (t) => {
t.minify('overlap');
t.end();
Expand Down

0 comments on commit be6c4ea

Please sign in to comment.