@@ -14,27 +14,27 @@ describe('LinkedErrors', () => {
14
14
describe ( 'handler' , ( ) => {
15
15
it ( 'should bail out if event doesnt contain exception' , async ( ) => {
16
16
expect . assertions ( 2 ) ;
17
- const spy = jest . spyOn ( linkedErrors , 'walkErrorTree ' ) ;
17
+ const spy = jest . spyOn ( linkedErrors , '_walkErrorTree ' ) ;
18
18
const event = {
19
19
message : 'foo' ,
20
20
} ;
21
- return linkedErrors . handler ( event ) . then ( ( result : any ) => {
21
+ return linkedErrors . _handler ( event ) . then ( ( result : any ) => {
22
22
expect ( spy . mock . calls . length ) . toEqual ( 0 ) ;
23
23
expect ( result ) . toEqual ( event ) ;
24
24
} ) ;
25
25
} ) ;
26
26
27
27
it ( 'should bail out if event contains exception, but no hint' , async ( ) => {
28
28
expect . assertions ( 2 ) ;
29
- const spy = jest . spyOn ( linkedErrors , 'walkErrorTree ' ) ;
29
+ const spy = jest . spyOn ( linkedErrors , '_walkErrorTree ' ) ;
30
30
const one = new Error ( 'originalException' ) ;
31
31
const backend = new NodeBackend ( { } ) ;
32
32
let event : Event | undefined ;
33
33
return backend
34
34
. eventFromException ( one )
35
35
. then ( eventFromException => {
36
36
event = eventFromException ;
37
- return linkedErrors . handler ( eventFromException ) ;
37
+ return linkedErrors . _handler ( eventFromException ) ;
38
38
} )
39
39
. then ( result => {
40
40
expect ( spy . mock . calls . length ) . toEqual ( 0 ) ;
@@ -44,7 +44,7 @@ describe('LinkedErrors', () => {
44
44
45
45
it ( 'should call walkErrorTree if event contains exception and hint with originalException' , async ( ) => {
46
46
expect . assertions ( 1 ) ;
47
- const spy = jest . spyOn ( linkedErrors , 'walkErrorTree ' ) . mockImplementation (
47
+ const spy = jest . spyOn ( linkedErrors , '_walkErrorTree ' ) . mockImplementation (
48
48
async ( ) =>
49
49
new Promise < [ ] > ( resolve => {
50
50
resolve ( [ ] ) ;
@@ -54,7 +54,7 @@ describe('LinkedErrors', () => {
54
54
const backend = new NodeBackend ( { } ) ;
55
55
return backend . eventFromException ( one ) . then ( event =>
56
56
linkedErrors
57
- . handler ( event , {
57
+ . _handler ( event , {
58
58
originalException : one ,
59
59
} )
60
60
. then ( _ => {
@@ -74,7 +74,7 @@ describe('LinkedErrors', () => {
74
74
const backend = new NodeBackend ( { } ) ;
75
75
return backend . eventFromException ( one ) . then ( event =>
76
76
linkedErrors
77
- . handler ( event , {
77
+ . _handler ( event , {
78
78
originalException : one ,
79
79
} )
80
80
. then ( ( result : any ) => {
@@ -107,7 +107,7 @@ describe('LinkedErrors', () => {
107
107
const backend = new NodeBackend ( { } ) ;
108
108
return backend . eventFromException ( one ) . then ( event =>
109
109
linkedErrors
110
- . handler ( event , {
110
+ . _handler ( event , {
111
111
originalException : one ,
112
112
} )
113
113
. then ( ( result : any ) => {
@@ -140,7 +140,7 @@ describe('LinkedErrors', () => {
140
140
const backend = new NodeBackend ( { } ) ;
141
141
return backend . eventFromException ( one ) . then ( event =>
142
142
linkedErrors
143
- . handler ( event , {
143
+ . _handler ( event , {
144
144
originalException : one ,
145
145
} )
146
146
. then ( ( result : any ) => {
0 commit comments