aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-04-19 04:17:15 +0800
committerGitHub <noreply@github.com>2017-04-19 04:17:15 +0800
commit28cfb65c47e7a2adeec35d8a78dd8bb0cf06af12 (patch)
treefdb91a32c8a3094631bdb487c443a4d1b466593a /test
parent0f4f01b66cb2aa4356309c70a7d6a95618603630 (diff)
downloadtracifyjs-28cfb65c47e7a2adeec35d8a78dd8bb0cf06af12.tar.gz
tracifyjs-28cfb65c47e7a2adeec35d8a78dd8bb0cf06af12.zip
extend `cascade` into `a.b` (#1829)
fixes #27
Diffstat (limited to 'test')
-rw-r--r--test/compress/sequences.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/sequences.js b/test/compress/sequences.js
index 3fb26278..10492565 100644
--- a/test/compress/sequences.js
+++ b/test/compress/sequences.js
@@ -688,3 +688,25 @@ side_effects_cascade_3: {
}
}
}
+
+issue_27: {
+ options = {
+ cascade: true,
+ passes: 2,
+ sequences: true,
+ side_effects: true,
+ unused: true,
+ }
+ input: {
+ (function(jQuery) {
+ var $;
+ $ = jQuery;
+ $("body").addClass("foo");
+ })(jQuery);
+ }
+ expect: {
+ (function(jQuery) {
+ jQuery("body").addClass("foo");
+ })(jQuery);
+ }
+}