File tree Expand file tree Collapse file tree 2 files changed +28
-27
lines changed Expand file tree Collapse file tree 2 files changed +28
-27
lines changed Original file line number Diff line number Diff line change 11export default ( { expect } : typeof import ( 'vitest' ) ) => {
2- class Foo {
3- declare foo : number
2+ class Foo {
3+ declare foo : number
44
5- constructor ( ) {
6- this . foo = 1
7- }
5+ constructor ( ) {
6+ this . foo = 1
7+ }
88
9- bar ( ) {
10- return 2
11- }
9+ bar ( ) {
10+ return 2
11+ }
1212
13- baz ( a = this . foo , b = this . bar ( ) ) {
14- return a + b
15- }
16- }
13+ baz ( a = this . foo , b = this . bar ( ) ) {
14+ return a + b
15+ }
16+ }
1717
18- const obj = {
19- foo : 1 ,
20- bar ( ) {
21- return 2
22- } ,
23- baz ( a = this . foo , b = this . bar ( ) ) {
24- return a + b
25- }
26- }
18+ const obj = {
19+ foo : 1 ,
20+ bar ( ) {
21+ return 2
22+ } ,
23+ baz ( a = this . foo , b = this . bar ( ) ) {
24+ return a + b
25+ }
26+ }
2727
28- const foo = new Foo ( )
29- expect ( foo . baz ( 3 , 4 ) ) . toBe ( 7 ) // Is this the real life?
30- expect ( foo . baz ( ) ) . toBe ( 3 ) // Is this just fantasy?
28+ const foo = ( new Foo )
3129
32- expect ( obj . baz ( 3 , 4 ) ) . toBe ( 7 ) // Caught in a landslide
33- expect ( obj . baz ( ) ) . toBe ( 3 ) // No escape from reality
30+ expect ( foo . baz ( 3 , 4 ) ) . toBe ( 7 ) // Is this the real life?
31+ expect ( foo . baz ( ) ) . toBe ( 3 ) // Is this just fantasy?
32+
33+ expect ( obj . baz ( 3 , 4 ) ) . toBe ( 7 ) // Caught in a landslide
34+ expect ( obj . baz ( ) ) . toBe ( 3 ) // No escape from reality
3435}
Original file line number Diff line number Diff line change @@ -830,7 +830,7 @@ export function transform(
830830 path . replaceWith ( t . callExpression (
831831 t . memberExpression ( t . super ( ) , t . identifier ( `valueOf` ) ) , [ ]
832832 ) )
833- } ,
833+ }
834834 } , scope )
835835 }
836836
You can’t perform that action at this time.
0 commit comments