Skip to content

Commit

Permalink
Updated test cases for smarter uglifying (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxwilko authored May 9, 2022
1 parent 5515149 commit 895fd7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Assetic/Test/Filter/UglifyJs3FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testDefines()
/**
* Copyright
*/
"undefined"==typeof FOO&&(FOO=1),function(){new Array(FOO,2,3,4);var bar=Array(a,b,c),var2=(new Array(5),new Array(a));function bar(foo){return var2.push(foo),foo}bar("abc123")}();
"undefined"==typeof FOO&&(FOO=1),function(){new Array(FOO,2,3,4);var bar=Array(a,b,c),var2=(new Array(5),new Array(a));function bar(foo){var2.push(foo)}bar("abc123")}();
JS;
$this->assertEquals($expected, $this->asset->getContent());
}
Expand All @@ -81,7 +81,7 @@ public function testMutipleDefines()
/**
* Copyright
*/
(function(){new Array(2,2,3,4);var bar=Array(a,b,c),var2=(new Array(5),new Array(a));function bar(foo){return var2.push(foo),foo}bar("abc123")})();
!function(){new Array(2,2,3,4);var bar=Array(a,b,c),var2=(new Array(5),new Array(a));function bar(foo){var2.push(foo)}bar("abc123")}();
JS;
$this->assertEquals($expected, $this->asset->getContent());
}
Expand All @@ -96,7 +96,7 @@ public function testUnsafeUglify()
/**
* Copyright
*/
"undefined"==typeof DEBUG&&(DEBUG=!0),"undefined"==typeof FOO&&(FOO=1),function(){FOO;var bar=[a,b,c],var2=Array(a);function bar(foo){return var2.push(foo),foo}DEBUG&&console.log("hellow world"),bar("abc123")}();
"undefined"==typeof DEBUG&&(DEBUG=!0),"undefined"==typeof FOO&&(FOO=1),function(){FOO;var bar=[a,b,c],var2=Array(a);function bar(foo){var2.push(foo)}DEBUG&&console.log("hellow world"),bar("abc123")}();
JS;
$this->assertEquals($expected, $this->asset->getContent());
}
Expand Down

0 comments on commit 895fd7e

Please sign in to comment.