File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
test/com/google/javascript/jscomp Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,49 @@ public void setUp() throws Exception {
69
69
disableCompareJsDoc ();
70
70
}
71
71
72
+ @ Test
73
+ public void testTs52OutputChange () {
74
+ test (
75
+ srcs (
76
+ lines (
77
+ "" , //
78
+ "var alias;" ,
79
+ "var module$exports$C = class {" ,
80
+ " method1() {" ,
81
+ " return alias.staticPropOnC;" ,
82
+ " }" ,
83
+ " method2() {" ,
84
+ " return alias.staticPropOnAlias;" ,
85
+ " }" ,
86
+ "}" ,
87
+ "alias = module$exports$C;" ,
88
+ "(() => {" ,
89
+ " alias.staticPropOnAlias = 1" ,
90
+ "})();" ,
91
+ "module$exports$C.staticPropOnC = 2;" ,
92
+ "" )),
93
+ expected (
94
+ lines (
95
+ "" , //
96
+ "var alias;" ,
97
+ "var module$exports$C = class {" ,
98
+ " method1() {" ,
99
+ " return alias.staticPropOnC;" ,
100
+ " }" ,
101
+ " method2() {" ,
102
+ " return alias.staticPropOnAlias;" ,
103
+ " }" ,
104
+ "}" ,
105
+ "alias = module$exports$C;" ,
106
+ "(() => {" ,
107
+ " alias.staticPropOnAlias = 1" ,
108
+ "})();" ,
109
+ // TODO : b/299055739 - bad collapse
110
+ "var module$exports$C$staticPropOnC = 2;" ,
111
+ "" ,
112
+ "" )));
113
+ }
114
+
72
115
@ Test
73
116
public void testDoNotCollapseDeletedProperty () {
74
117
testSame (
You can’t perform that action at this time.
0 commit comments