Skip to content

Commit 483810c

Browse files
committed
fixes @typescript-eslint/no-unnecessary-type-assertion in tests
1 parent 28383b8 commit 483810c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/core/test/tracing/integrations/userInteraction.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('User Interaction Tracing', () => {
212212
op: 'different.op',
213213
}),
214214
);
215-
expect(firstTransactionEvent.timestamp).toBeGreaterThanOrEqual(spanToJSON(secondTransaction).start_timestamp!);
215+
expect(firstTransactionEvent.timestamp).toBeGreaterThanOrEqual(spanToJSON(secondTransaction).start_timestamp);
216216
});
217217

218218
test('different UI event and same element finish first transaction with last span', () => {
@@ -297,7 +297,7 @@ describe('User Interaction Tracing', () => {
297297
timestamp: expect.any(Number),
298298
}),
299299
);
300-
expect(interactionTransactionContext.timestamp).toBeLessThanOrEqual(routingTransactionContext.start_timestamp!);
300+
expect(interactionTransactionContext.timestamp).toBeLessThanOrEqual(routingTransactionContext.start_timestamp);
301301
});
302302

303303
test('does not start UI span when app is in background', () => {

packages/core/test/tracing/reactnavigation.ttid.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ describe('React Navigation - TTID', () => {
285285
TestRenderer.render(<TimeToFullDisplay record />);
286286
mockRecordedTimeToDisplay({
287287
ttidNavigation: {
288-
[spanToJSON(getActiveSpan()).span_id!]: nowInSeconds(),
288+
[spanToJSON(getActiveSpan()).span_id]: nowInSeconds(),
289289
},
290290
ttfd: {
291-
[spanToJSON(getActiveSpan()).span_id!]: nowInSeconds(),
291+
[spanToJSON(getActiveSpan()).span_id]: nowInSeconds(),
292292
},
293293
});
294294

@@ -389,10 +389,10 @@ describe('React Navigation - TTID', () => {
389389
TestRenderer.render(<TimeToFullDisplay record />);
390390
mockRecordedTimeToDisplay({
391391
ttidNavigation: {
392-
[spanToJSON(getActiveSpan()).span_id!]: timestampInSeconds(),
392+
[spanToJSON(getActiveSpan()).span_id]: timestampInSeconds(),
393393
},
394394
ttfd: {
395-
[spanToJSON(getActiveSpan()).span_id!]: timestampInSeconds(),
395+
[spanToJSON(getActiveSpan()).span_id]: timestampInSeconds(),
396396
},
397397
});
398398

0 commit comments

Comments
 (0)