File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,8 @@ test.snapshot({
21
21
'class A3 { static #a = 1; }' ,
22
22
'const A3 = class { static #a() {}; }' ,
23
23
'const A3 = class { static #a = 1; }' ,
24
- // TODO: enable this test when ESLint support `StaticBlock`
25
24
// Static block
26
- // 'class A2 { static {}; }',
25
+ 'class A2 { static {}; }' ,
27
26
] ,
28
27
invalid : [
29
28
'class A { static a() {}; }' ,
Original file line number Diff line number Diff line change @@ -169,9 +169,6 @@ const errorNaN = [
169
169
} ,
170
170
] ;
171
171
172
- // TODO: Add following tests whenESLint support `proposal-class-fields`
173
- // 'class Foo {NaN = 1}',
174
- // 'class Foo {[NaN] = 1}',
175
172
test ( {
176
173
valid : [
177
174
'const foo = Number.NaN;' ,
@@ -202,6 +199,9 @@ test({
202
199
'class NaN {}' ,
203
200
'const Foo = class NaN {}' ,
204
201
'class Foo {NaN(){}}' ,
202
+ 'class Foo {#NaN(){}}' ,
203
+ 'class Foo3 {NaN = 1}' ,
204
+ 'class Foo {#NaN = 1}' ,
205
205
outdent `
206
206
NaN: for (const foo of bar) {
207
207
if (a) {
@@ -289,6 +289,11 @@ test({
289
289
output : 'const foo = Number.NaN.toString();' ,
290
290
errors : errorNaN ,
291
291
} ,
292
+ {
293
+ code : 'class Foo3 {[NaN] = 1}' ,
294
+ output : 'class Foo3 {[Number.NaN] = 1}' ,
295
+ errors : errorNaN ,
296
+ } ,
292
297
] ,
293
298
} ) ;
294
299
You can’t perform that action at this time.
0 commit comments