File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -39,5 +39,13 @@ test.snapshot({
3939 foo;
4040 new (( Response ))(JSON.stringify(data))
4141 ` ,
42+ outdent `
43+ foo;
44+ (( new (( Response ))(JSON.stringify(data)) ))
45+ ` ,
46+ outdent `
47+ foo
48+ (( new (( Response ))(JSON.stringify(data)) ))
49+ ` ,
4250 ] ,
4351} ) ;
Original file line number Diff line number Diff line change @@ -165,3 +165,51 @@ Generated by [AVA](https://avajs.dev).
165165 > 2 | new (( Response ))(JSON.stringify(data))␊
166166 | ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊
167167 `
168+
169+ ## invalid(8): foo; (( new (( Response ))(JSON.stringify(data)) ))
170+
171+ > Input
172+
173+ `␊
174+ 1 | foo;␊
175+ 2 | (( new (( Response ))(JSON.stringify(data)) ))␊
176+ `
177+
178+ > Output
179+
180+ `␊
181+ 1 | foo;␊
182+ 2 | (( (( Response.json ))(data) ))␊
183+ `
184+
185+ > Error 1/1
186+
187+ `␊
188+ 1 | foo;␊
189+ > 2 | (( new (( Response ))(JSON.stringify(data)) ))␊
190+ | ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊
191+ `
192+
193+ ## invalid(9): foo (( new (( Response ))(JSON.stringify(data)) ))
194+
195+ > Input
196+
197+ `␊
198+ 1 | foo␊
199+ 2 | (( new (( Response ))(JSON.stringify(data)) ))␊
200+ `
201+
202+ > Output
203+
204+ `␊
205+ 1 | foo␊
206+ 2 | (( (( Response.json ))(data) ))␊
207+ `
208+
209+ > Error 1/1
210+
211+ `␊
212+ 1 | foo␊
213+ > 2 | (( new (( Response ))(JSON.stringify(data)) ))␊
214+ | ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊
215+ `
You can’t perform that action at this time.
0 commit comments