Skip to content

Commit 3a12c53

Browse files
committed
ease up nr of incremental snapshots
1 parent 00f76d6 commit 3a12c53

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/integration-tests/suites/replay/errors/droppedError/test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ sentryTest(
7272
// The first event should have both, full and incremental snapshots,
7373
// as we recorded and kept all events in the buffer
7474
expect(content0.fullSnapshots).toHaveLength(1);
75-
expect(content0.incrementalSnapshots).toHaveLength(10);
75+
// We don't know how many incremental snapshots we'll have (also browser-dependent),
76+
// but we know that we have at least 5
77+
expect(content0.incrementalSnapshots.length).toBeGreaterThan(5);
7678
// We want to make sure that the event that triggered the error was recorded.
7779
expect(content0.breadcrumbs).toEqual(
7880
expect.arrayContaining([

packages/integration-tests/suites/replay/errors/errorMode/test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sentryTest(
2929

3030
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
3131
const event = envelopeRequestParser(route.request());
32-
// error event have no type field
32+
// error events have no type field
3333
if (event && !event.type && event.event_id) {
3434
errorEventId = event.event_id;
3535
}
@@ -81,7 +81,9 @@ sentryTest(
8181
// The first event should have both, full and incremental snapshots,
8282
// as we recorded and kept all events in the buffer
8383
expect(content0.fullSnapshots).toHaveLength(1);
84-
expect(content0.incrementalSnapshots).toHaveLength(10);
84+
// We don't know how many incremental snapshots we'll have (also browser-dependent),
85+
// but we know that we have at least 5
86+
expect(content0.incrementalSnapshots.length).toBeGreaterThan(5);
8587
// We want to make sure that the event that triggered the error was recorded.
8688
expect(content0.breadcrumbs).toEqual(
8789
expect.arrayContaining([

packages/integration-tests/suites/replay/errors/errorsInSession/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sentryTest(
2424

2525
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
2626
const event = envelopeRequestParser(route.request());
27-
// error event have no type field
27+
// error events have no type field
2828
if (event && !event.type && event.event_id) {
2929
errorEventId = event.event_id;
3030
}

0 commit comments

Comments
 (0)