@@ -23,7 +23,6 @@ for (a in b, c);
23
23
for (a in b);
24
24
` ,
25
25
} ) ,
26
- `t.true((me.get as SinonStub).calledWithExactly('/foo', other));` ,
27
26
...batchedSingleLineTests ( {
28
27
code : `
29
28
while ((foo = bar())) {}
@@ -120,6 +119,27 @@ typeof (a);
120
119
} ) ,
121
120
...batchedSingleLineTests ( {
122
121
code : `
122
+ const x = (1 as 1) | (1 as 1);
123
+ const x = (<1>1) | (<1>1);
124
+ const x = (1 as 1) | 2;
125
+ const x = (1 as 1) + 2 + 2;
126
+ const x = 1 + 1 + (2 as 2);
127
+ const x = 1 | (2 as 2);
128
+ const x = (<1>1) | 2;
129
+ const x = 1 | (<2>2);
130
+ t.true((me.get as SinonStub).calledWithExactly('/foo', other));
131
+ t.true((<SinonStub>me.get).calledWithExactly('/foo', other));
132
+ (requestInit.headers as Headers).get('Cookie');
133
+ (<Headers> requestInit.headers).get('Cookie');
134
+ ` ,
135
+ parserOptions : {
136
+ ecmaFeatures : {
137
+ jsx : false ,
138
+ } ,
139
+ } ,
140
+ } ) ,
141
+ ...batchedSingleLineTests ( {
142
+ code : `
123
143
[a as b];
124
144
() => (1 as 1);
125
145
x = a as b;
@@ -155,6 +175,48 @@ switch (foo) { case 1: case (2 as 2): break; default: break; }
155
175
} ,
156
176
] ,
157
177
} ) ,
178
+ ...batchedSingleLineTests ( {
179
+ code : `
180
+ [<b>a];
181
+ () => (<1>1);
182
+ x = <b>a;
183
+ const x = (<1>1) | 2;
184
+ const x = 1 | (<2>2);
185
+ const x = await (<Promise<void>>foo);
186
+ const res2 = (<foo>fn)();
187
+ (<boolean>x) ? 1 : 0;
188
+ x ? (<1>1) : 2;
189
+ x ? 1 : (<2>2);
190
+ while (<boolean>foo) {};
191
+ do {} while (<boolean>foo);
192
+ for (let i of (<Foo>[])) {}
193
+ for (let i in (<Foo>{})) {}
194
+ for ((<1>1);;) {}
195
+ for (;(<1>1);) {}
196
+ for (;;(<1>1)) {}
197
+ if (<1>1) {}
198
+ const x = (<1>1).toString();
199
+ new (<1>1)();
200
+ const x = { ...(<1>1), ...{} };
201
+ throw (<1>1);
202
+ throw 1;
203
+ const x = !(<1>1);
204
+ const x = (<1>1)++;
205
+ function *x() { yield (<1>1); yield 1; }
206
+ switch (foo) { case 1: case (<2>2): break; default: break; }
207
+ ` ,
208
+ parserOptions : {
209
+ ecmaFeatures : {
210
+ jsx : false ,
211
+ } ,
212
+ } ,
213
+ options : [
214
+ 'all' ,
215
+ {
216
+ nestedBinaryExpressions : false ,
217
+ } ,
218
+ ] ,
219
+ } ) ,
158
220
] ,
159
221
160
222
invalid : [
0 commit comments