Skip to content

Commit

Permalink
feature: @putout/minify: add support of merge-assignment-expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jun 16, 2024
1 parent 8214a3d commit da367bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/fixture/class-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var a='foo',b=123.4;class C{f(){}constructor(){this.d=a;this.e=b}}var g=new C();globalThis.h=g;globalThis.i=g;
var a='foo',b=123.4;class C{f(){}constructor(){this.d=a;this.e=b}}var g=new C();globalThis.h=globalThis.i=g;
1 change: 1 addition & 0 deletions test/fixture/merge-assignment-expressions-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a=b=c=5;
3 changes: 3 additions & 0 deletions test/fixture/merge-assignment-expressions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = 5;
b = 5;
c = 5;
5 changes: 5 additions & 0 deletions test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ test('@putout/minify: merge-duplicate-functions', (t) => {
t.end();
});

test('@putout/minify: merge-assignment-expressions', (t) => {
t.minify('merge-assignment-expressions');
t.end();
});

test('@putout/minify: merge-duplicate-imports', (t) => {
t.minify('merge-duplicate-imports', {
run: false,
Expand Down

0 comments on commit da367bd

Please sign in to comment.