Skip to content

Commit 37535a0

Browse files
committed
ref: Add test for lastEventId
1 parent d5941d3 commit 37535a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/hub/test/hub.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { Client, Event } from '@sentry/types';
55

66
import { getCurrentHub, Hub, Scope } from '../src';
7+
import { EventType } from '@sentry/types/build/types/event';
78

89
const clientFn: any = jest.fn();
910

@@ -358,10 +359,11 @@ describe('Hub', () => {
358359
expect(args[1].event_id).toEqual(hub.lastEventId());
359360
});
360361

361-
test('transactions do not set lastEventId', () => {
362+
const eventTypesToIgnoreLastEventId: EventType[] = ['transaction', 'replay_event'];
363+
it.each(eventTypesToIgnoreLastEventId)('eventType %s does not set lastEventId', eventType => {
362364
const event: Event = {
363365
extra: { b: 3 },
364-
type: 'transaction',
366+
type: eventType,
365367
};
366368
const testClient = makeClient();
367369
const hub = new Hub(testClient);

0 commit comments

Comments
 (0)