|
1 |
| -// eslint-disable @typescript-eslint/no-unnecessary-type-assertion |
2 | 1 | import type { Client, Log } from '@sentry/core';
|
3 | 2 | import { debug } from '@sentry/core';
|
4 | 3 | import { logEnricherIntegration } from '../../src/js/integrations/logEnricherIntegration';
|
@@ -162,7 +161,7 @@ describe('LogEnricher Integration', () => {
|
162 | 161 | // Extract the log handler
|
163 | 162 | const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
|
164 | 163 | expect(beforeCaptureLogCall).toBeDefined();
|
165 |
| - logHandler = beforeCaptureLogCall![1] as (log: Log) => void; |
| 164 | + logHandler = beforeCaptureLogCall![1]; |
166 | 165 |
|
167 | 166 | mockLog = {
|
168 | 167 | message: 'Test log message',
|
@@ -246,7 +245,7 @@ describe('LogEnricher Integration', () => {
|
246 | 245 |
|
247 | 246 | const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
|
248 | 247 | expect(beforeCaptureLogCall).toBeDefined();
|
249 |
| - const newLogHandler = beforeCaptureLogCall![1] as (log: Log) => void; |
| 248 | + const newLogHandler = beforeCaptureLogCall![1]; |
250 | 249 |
|
251 | 250 | newLogHandler(mockLog);
|
252 | 251 |
|
@@ -292,7 +291,7 @@ describe('LogEnricher Integration', () => {
|
292 | 291 |
|
293 | 292 | const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
|
294 | 293 | expect(beforeCaptureLogCall).toBeDefined();
|
295 |
| - const emptyLogHandler = beforeCaptureLogCall![1] as (log: Log) => void; |
| 294 | + const emptyLogHandler = beforeCaptureLogCall![1]; |
296 | 295 |
|
297 | 296 | emptyLogHandler(mockLog);
|
298 | 297 |
|
@@ -324,7 +323,7 @@ describe('LogEnricher Integration', () => {
|
324 | 323 |
|
325 | 324 | const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
|
326 | 325 | expect(beforeCaptureLogCall).toBeDefined();
|
327 |
| - const partialLogHandler = beforeCaptureLogCall![1] as (log: Log) => void; |
| 326 | + const partialLogHandler = beforeCaptureLogCall![1]; |
328 | 327 |
|
329 | 328 | partialLogHandler(mockLog);
|
330 | 329 |
|
@@ -358,7 +357,7 @@ describe('LogEnricher Integration', () => {
|
358 | 357 |
|
359 | 358 | const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
|
360 | 359 | expect(beforeCaptureLogCall).toBeDefined();
|
361 |
| - const partialLogHandler = beforeCaptureLogCall![1] as (log: Log) => void; |
| 360 | + const partialLogHandler = beforeCaptureLogCall![1]; |
362 | 361 |
|
363 | 362 | partialLogHandler(mockLog);
|
364 | 363 |
|
@@ -448,7 +447,7 @@ describe('LogEnricher Integration', () => {
|
448 | 447 |
|
449 | 448 | const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
|
450 | 449 | expect(beforeCaptureLogCall).toBeDefined();
|
451 |
| - logHandler = beforeCaptureLogCall![1] as (log: Log) => void; |
| 450 | + logHandler = beforeCaptureLogCall![1]; |
452 | 451 |
|
453 | 452 | mockLog = {
|
454 | 453 | message: 'Test log message',
|
|
0 commit comments