Skip to content

Commit

Permalink
ref(test): Filter out scroll from snapshots
Browse files Browse the repository at this point in the history
In addition to mouse move and viewport resize events, filter out scroll events from snapshots. These seem to flake a lot locally.
  • Loading branch information
billyvg committed Aug 7, 2023
1 parent d85c447 commit 91a90ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/rrweb/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ function stringifySnapshots(snapshots: eventWithTime[]): string {
.filter((s) => {
if (
s.type === EventType.IncrementalSnapshot &&
(s.data.source === IncrementalSource.MouseMove ||
s.data.source === IncrementalSource.ViewportResize)
[
IncrementalSource.MouseMove,
IncrementalSource.Scroll,
IncrementalSource.ViewportResize,
].includes(s.data.source)
) {
return false;
}
Expand Down

0 comments on commit 91a90ed

Please sign in to comment.