@@ -385,108 +385,5 @@ describe('transformations', () => {
385
385
}
386
386
} ) ;
387
387
}
388
- // describe('all transformations', () => {
389
- // for(const{src:src, valid:valid, has_constructor:has_constructor,
390
- // has_super:has_super } of simple_classes) {
391
- // if(valid){
392
- // test(src+ " is still valid", () =>{
393
- // expect(valid_super_calls_after_transformation(src)).
394
- // toBeTruthy();
395
- // });
396
- // if(has_constructor && has_super){
397
- // test(src+ " keeps super call", () =>{
398
- // expect(has_super_calls_after_transformation(src)).
399
- // toBeTruthy();
400
- // });
401
- // } if(has_constructor && !has_super) {
402
- // test(src+ " keeps super call", () =>{
403
- // expect(has_super_calls_after_transformation(src)).
404
- // toBeFalsy();
405
- // });
406
- // }
407
- // }
408
- // }
409
- // });
410
- // describe('insertCheckPoint', () => {
411
- // for(const{src:src, valid:valid, has_constructor:has_constructor,
412
- // has_super:has_super } of simple_classes) {
413
- // if(valid){
414
- // test(src+ " is still valid", () =>{
415
- // expect(valid_super_calls_after_insert_checkpoint(src)).
416
- // toBeTruthy();
417
- // });
418
- // if(has_constructor && has_super){
419
- // test(src+ " keeps super call", () =>{
420
- // expect(has_super_calls_after_insert_checkpoint(src)).
421
- // toBeTruthy();
422
- // });
423
- // } if(has_constructor && !has_super) {
424
- // test(src+ " keeps super call", () =>{
425
- // expect(has_super_calls_after_insert_checkpoint(src)).
426
- // toBeFalsy();
427
- // });
428
- // }
429
- // }
430
- // }
431
- // })
432
- ;
433
388
} ) ;
434
389
435
-
436
- // test('transformation:valid-super-call when there is no constructor', () => {
437
- // expect(valid_super_calls_after_transformation('class C { }')).toBeTruthy();
438
- // });
439
- // test('transformation:valid-super-call when there is an empty constructor', () => {
440
- // expect(valid_super_calls_after_transformation('class C { constructor() { } }')).toBeTruthy();
441
- // expect(has_super_call_after_transformation('class C { constructor() { } }')).toBeTruthy();
442
- // });
443
- // test('transformation:valid-super-call when there is a constructor with super at first',
444
- // () => {
445
- // expect(valid_super_calls_after_transformation(
446
- // 'class C { constructor() {super(); } }')).toBeTruthy();
447
- // expect(has_super_calls_after_transformation(
448
- // 'class C { constructor() {super(); } }')).toBeTruthy();
449
- // });
450
- // test('transformation:invalid-super-call when super is not a statement',
451
- // () => {expect(valid_super_calls_after_transformation(
452
- // 'class C { constructor() {x=super(); } }')).toBeFalsy();
453
- // });
454
- // test('transformation:invalid-super-call when there is a constructor with two supers',
455
- // () => {
456
- // expect(valid_super_calls_after_transformation(
457
- // 'class C { constructor() {super();super();} }')).toBeFalsy();
458
- // expect(valid_super_calls_after_transformation(
459
- // 'class C { constructor() {super();x=super();} }')).toBeFalsy();
460
- // });
461
- // test('transformation:invalid-super-call when there is a statement before super',
462
- // () => {expect(valid_super_calls_after_transformation(
463
- // 'class C { constructor() {x=1;super();} }')).toBeFalsy();
464
- // });
465
-
466
- // function valid_super_calls_after_insert_checkpoint(text) {
467
- // return valid_super_calls(run_insertCheckPoint(text));
468
- // }
469
- // function has_super_calls_after_insert_checkpoint(text) {
470
- // return has_super_calls(run_insertCheckPoint(text));
471
- // }
472
-
473
- // test('insertCheckPoint:valid-super-call when there is no constructor', () => {
474
- // expect(valid_super_calls_after_insert_checkpoint('class C { }')).
475
- // toBeTruthy();
476
- // });
477
- // test('insertCheckPoint:valid-super-call when there is an empty constructor',
478
- // () => {
479
- // expect(valid_super_calls_after_insert_checkpoint(
480
- // 'class C { constructor() { } }')).toBeTruthy();
481
- // expect(has_super_calls_after_insert_checkpoint(
482
- // 'class C { constructor() { } }')).toBeFalsy();
483
- // });
484
- // test('insertCheckPoint:valid-super-call when there is a constructor with '+
485
- // 'super at first', () => {
486
- // expect(valid_super_calls_after_insert_checkpoint(
487
- // 'class C { constructor() {super(); } }')).toBeTruthy();
488
- // expect(has_super_calls_after_insert_checkpoint(
489
- // 'class C { constructor() {super(); } }')).toBeTruthy();
490
- // });
491
-
492
-
0 commit comments