-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
test.ts
26 lines (20 loc) · 897 Bytes
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { expect } from '@playwright/test';
import { Event } from '@sentry/types';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
sentryTest('should be able to handle circular data', async ({ getLocalTestPath, page }) => {
const url = await getLocalTestPath({ testDir: __dirname });
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
expect(eventData.type).toBe('transaction');
expect(eventData.transaction).toBe('circular_object_test_transaction');
expect(eventData.contexts).toMatchObject({
trace: {
data: { lays: { contains: '[Circular ~]' } },
},
});
expect(eventData?.spans?.[0]).toMatchObject({
data: { lays: { contains: '[Circular ~]' } },
op: 'circular_object_test_span',
});
await new Promise(resolve => setTimeout(resolve, 2000));
});