@@ -82,10 +82,12 @@ describe('NodeClient', () => {
82
82
initOpenTelemetry ( client ) ;
83
83
84
84
withIsolationScope ( isolationScope => {
85
+ // eslint-disable-next-line deprecation/deprecation
85
86
isolationScope . setRequestSession ( { status : 'ok' } ) ;
86
87
87
88
client . captureException ( new Error ( 'test exception' ) ) ;
88
89
90
+ // eslint-disable-next-line deprecation/deprecation
89
91
const requestSession = isolationScope . getRequestSession ( ) ;
90
92
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
91
93
} ) ;
@@ -103,10 +105,12 @@ describe('NodeClient', () => {
103
105
client . initSessionFlusher ( ) ;
104
106
105
107
withIsolationScope ( isolationScope => {
108
+ // eslint-disable-next-line deprecation/deprecation
106
109
isolationScope . setRequestSession ( { status : 'ok' } ) ;
107
110
108
111
client . captureException ( new Error ( 'test exception' ) ) ;
109
112
113
+ // eslint-disable-next-line deprecation/deprecation
110
114
const requestSession = isolationScope . getRequestSession ( ) ;
111
115
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
112
116
} ) ;
@@ -124,10 +128,12 @@ describe('NodeClient', () => {
124
128
client . initSessionFlusher ( ) ;
125
129
126
130
withIsolationScope ( isolationScope => {
131
+ // eslint-disable-next-line deprecation/deprecation
127
132
isolationScope . setRequestSession ( { status : 'crashed' } ) ;
128
133
129
134
client . captureException ( new Error ( 'test exception' ) ) ;
130
135
136
+ // eslint-disable-next-line deprecation/deprecation
131
137
const requestSession = isolationScope . getRequestSession ( ) ;
132
138
expect ( requestSession ! . status ) . toEqual ( 'crashed' ) ;
133
139
} ) ;
@@ -145,10 +151,12 @@ describe('NodeClient', () => {
145
151
client . initSessionFlusher ( ) ;
146
152
147
153
withIsolationScope ( isolationScope => {
154
+ // eslint-disable-next-line deprecation/deprecation
148
155
isolationScope . setRequestSession ( { status : 'ok' } ) ;
149
156
150
157
client . captureException ( new Error ( 'test exception' ) ) ;
151
158
159
+ // eslint-disable-next-line deprecation/deprecation
152
160
const requestSession = isolationScope . getRequestSession ( ) ;
153
161
expect ( requestSession ! . status ) . toEqual ( 'errored' ) ;
154
162
} ) ;
@@ -167,13 +175,15 @@ describe('NodeClient', () => {
167
175
168
176
let isolationScope : Scope ;
169
177
withIsolationScope ( _isolationScope => {
178
+ // eslint-disable-next-line deprecation/deprecation
170
179
_isolationScope . setRequestSession ( { status : 'ok' } ) ;
171
180
isolationScope = _isolationScope ;
172
181
} ) ;
173
182
174
183
client . captureException ( new Error ( 'test exception' ) ) ;
175
184
176
185
setImmediate ( ( ) => {
186
+ // eslint-disable-next-line deprecation/deprecation
177
187
const requestSession = isolationScope . getRequestSession ( ) ;
178
188
expect ( requestSession ) . toEqual ( { status : 'ok' } ) ;
179
189
done ( ) ;
@@ -194,8 +204,10 @@ describe('NodeClient', () => {
194
204
client . initSessionFlusher ( ) ;
195
205
196
206
withIsolationScope ( isolationScope => {
207
+ // eslint-disable-next-line deprecation/deprecation
197
208
isolationScope . setRequestSession ( { status : 'ok' } ) ;
198
209
client . captureEvent ( { message : 'message' , exception : { values : [ { type : 'exception type 1' } ] } } ) ;
210
+ // eslint-disable-next-line deprecation/deprecation
199
211
const requestSession = isolationScope . getRequestSession ( ) ;
200
212
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
201
213
} ) ;
@@ -209,10 +221,12 @@ describe('NodeClient', () => {
209
221
client . initSessionFlusher ( ) ;
210
222
211
223
withIsolationScope ( isolationScope => {
224
+ // eslint-disable-next-line deprecation/deprecation
212
225
isolationScope . setRequestSession ( { status : 'ok' } ) ;
213
226
214
227
client . captureEvent ( { message : 'message' , exception : { values : [ { type : 'exception type 1' } ] } } ) ;
215
228
229
+ // eslint-disable-next-line deprecation/deprecation
216
230
const requestSession = isolationScope . getRequestSession ( ) ;
217
231
expect ( requestSession ! . status ) . toEqual ( 'errored' ) ;
218
232
} ) ;
@@ -230,10 +244,12 @@ describe('NodeClient', () => {
230
244
client . initSessionFlusher ( ) ;
231
245
232
246
withIsolationScope ( isolationScope => {
247
+ // eslint-disable-next-line deprecation/deprecation
233
248
isolationScope . setRequestSession ( { status : 'ok' } ) ;
234
249
235
250
client . captureEvent ( { message : 'message' } ) ;
236
251
252
+ // eslint-disable-next-line deprecation/deprecation
237
253
const requestSession = isolationScope . getRequestSession ( ) ;
238
254
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
239
255
} ) ;
@@ -254,6 +270,7 @@ describe('NodeClient', () => {
254
270
isolationScope . clear ( ) ;
255
271
client . captureEvent ( { message : 'message' , exception : { values : [ { type : 'exception type 1' } ] } } ) ;
256
272
273
+ // eslint-disable-next-line deprecation/deprecation
257
274
expect ( isolationScope . getRequestSession ( ) ) . toEqual ( undefined ) ;
258
275
} ) ;
259
276
} ) ;
@@ -270,10 +287,12 @@ describe('NodeClient', () => {
270
287
client . initSessionFlusher ( ) ;
271
288
272
289
withIsolationScope ( isolationScope => {
290
+ // eslint-disable-next-line deprecation/deprecation
273
291
isolationScope . setRequestSession ( { status : 'ok' } ) ;
274
292
275
293
client . captureEvent ( { message : 'message' , type : 'transaction' } ) ;
276
294
295
+ // eslint-disable-next-line deprecation/deprecation
277
296
const requestSession = isolationScope . getRequestSession ( ) ;
278
297
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
279
298
} ) ;
@@ -287,10 +306,12 @@ describe('NodeClient', () => {
287
306
initOpenTelemetry ( client ) ;
288
307
289
308
withIsolationScope ( isolationScope => {
309
+ // eslint-disable-next-line deprecation/deprecation
290
310
isolationScope . setRequestSession ( { status : 'ok' } ) ;
291
311
292
312
client . captureEvent ( { message : 'message' , exception : { values : [ { type : 'exception type 1' } ] } } ) ;
293
313
314
+ // eslint-disable-next-line deprecation/deprecation
294
315
const requestSession = isolationScope . getRequestSession ( ) ;
295
316
expect ( requestSession ! . status ) . toEqual ( 'ok' ) ;
296
317
} ) ;
@@ -527,6 +548,7 @@ describe('flush/close', () => {
527
548
// not due to the interval running every 60s
528
549
clearInterval ( client [ '_sessionFlusher' ] ! [ '_intervalId' ] ) ;
529
550
551
+ // eslint-disable-next-line deprecation/deprecation
530
552
const sessionFlusherFlushFunc = jest . spyOn ( SessionFlusher . prototype , 'flush' ) ;
531
553
532
554
const delay = 1 ;
0 commit comments