@@ -232,15 +232,15 @@ describe('console', () => {
232
232
expect ( mockWarn . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'warn' ) ;
233
233
expect ( normalizeCodeLocInfo ( mockWarn . mock . calls [ 0 ] [ 1 ] ) ) . toEqual (
234
234
supportsOwnerStacks
235
- ? '\n in Parent (at **)'
235
+ ? '\n in Child (at **)\n in Parent (at **)'
236
236
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
237
237
) ;
238
238
expect ( mockError ) . toHaveBeenCalledTimes ( 1 ) ;
239
239
expect ( mockError . mock . calls [ 0 ] ) . toHaveLength ( 2 ) ;
240
240
expect ( mockError . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'error' ) ;
241
241
expect ( normalizeCodeLocInfo ( mockError . mock . calls [ 0 ] [ 1 ] ) ) . toBe (
242
242
supportsOwnerStacks
243
- ? '\n in Parent (at **)'
243
+ ? '\n in Child (at **)\n in Parent (at **)'
244
244
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
245
245
) ;
246
246
} ) ;
@@ -279,7 +279,8 @@ describe('console', () => {
279
279
expect ( mockWarn . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'active warn' ) ;
280
280
expect ( normalizeCodeLocInfo ( mockWarn . mock . calls [ 0 ] [ 1 ] ) ) . toEqual (
281
281
supportsOwnerStacks
282
- ? '\n in Parent (at **)'
282
+ ? // TODO: It would be nice to have a Child stack frame here since it's just the effect function.
283
+ '\n in Parent (at **)'
283
284
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
284
285
) ;
285
286
expect ( mockWarn . mock . calls [ 1 ] ) . toHaveLength ( 2 ) ;
@@ -497,15 +498,15 @@ describe('console', () => {
497
498
expect ( mockWarn . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'warn' ) ;
498
499
expect ( normalizeCodeLocInfo ( mockWarn . mock . calls [ 0 ] [ 1 ] ) ) . toEqual (
499
500
supportsOwnerStacks
500
- ? '\n in Parent (at **)'
501
+ ? '\n in Child (at **)\n in Parent (at **)'
501
502
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
502
503
) ;
503
504
expect ( mockError ) . toHaveBeenCalledTimes ( 1 ) ;
504
505
expect ( mockError . mock . calls [ 0 ] ) . toHaveLength ( 2 ) ;
505
506
expect ( mockError . mock . calls [ 0 ] [ 0 ] ) . toBe ( 'error' ) ;
506
507
expect ( normalizeCodeLocInfo ( mockError . mock . calls [ 0 ] [ 1 ] ) ) . toBe (
507
508
supportsOwnerStacks
508
- ? '\n in Parent (at **)'
509
+ ? '\n in Child (at **)\n in Parent (at **)'
509
510
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
510
511
) ;
511
512
} ) ;
@@ -1032,7 +1033,7 @@ describe('console', () => {
1032
1033
expect ( mockWarn . mock . calls [ 0 ] ) . toHaveLength ( 2 ) ;
1033
1034
expect ( normalizeCodeLocInfo ( mockWarn . mock . calls [ 0 ] [ 1 ] ) ) . toEqual (
1034
1035
supportsOwnerStacks
1035
- ? '\n in Parent (at **)'
1036
+ ? '\n in Child (at **)\n in Parent (at **)'
1036
1037
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
1037
1038
) ;
1038
1039
expect ( mockWarn . mock . calls [ 1 ] ) . toHaveLength ( 3 ) ;
@@ -1042,15 +1043,16 @@ describe('console', () => {
1042
1043
expect ( mockWarn . mock . calls [ 1 ] [ 1 ] ) . toMatch ( 'warn' ) ;
1043
1044
expect ( normalizeCodeLocInfo ( mockWarn . mock . calls [ 1 ] [ 2 ] ) . trim ( ) ) . toEqual (
1044
1045
supportsOwnerStacks
1045
- ? 'in Parent (at **)'
1046
+ ? 'in Object.overrideMethod (at **)' + // TODO: This leading frame is due to our extra wrapper that shouldn't exist.
1047
+ '\n in Child (at **)\n in Parent (at **)'
1046
1048
: 'in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
1047
1049
) ;
1048
1050
1049
1051
expect ( mockError ) . toHaveBeenCalledTimes ( 2 ) ;
1050
1052
expect ( mockError . mock . calls [ 0 ] ) . toHaveLength ( 2 ) ;
1051
1053
expect ( normalizeCodeLocInfo ( mockError . mock . calls [ 0 ] [ 1 ] ) ) . toEqual (
1052
1054
supportsOwnerStacks
1053
- ? '\n in Parent (at **)'
1055
+ ? '\n in Child (at **)\n in Parent (at **)'
1054
1056
: '\n in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
1055
1057
) ;
1056
1058
expect ( mockError . mock . calls [ 1 ] ) . toHaveLength ( 3 ) ;
@@ -1060,7 +1062,8 @@ describe('console', () => {
1060
1062
expect ( mockError . mock . calls [ 1 ] [ 1 ] ) . toEqual ( 'error' ) ;
1061
1063
expect ( normalizeCodeLocInfo ( mockError . mock . calls [ 1 ] [ 2 ] ) . trim ( ) ) . toEqual (
1062
1064
supportsOwnerStacks
1063
- ? 'in Parent (at **)'
1065
+ ? 'in Object.overrideMethod (at **)' + // TODO: This leading frame is due to our extra wrapper that shouldn't exist.
1066
+ '\n in Child (at **)\n in Parent (at **)'
1064
1067
: 'in Child (at **)\n in Intermediate (at **)\n in Parent (at **)' ,
1065
1068
) ;
1066
1069
} ) ;
0 commit comments