chore: reduce flakey test due to '[vite] connected' message (#1525)
This commit is contained in:
2
.changeset/two-boats-boil.md
Normal file
2
.changeset/two-boats-boil.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
@@ -110,9 +110,17 @@ export function stringifySnapshots(snapshots: eventWithTime[]): string {
|
|||||||
snapshots
|
snapshots
|
||||||
.filter((s) => {
|
.filter((s) => {
|
||||||
if (
|
if (
|
||||||
s.type === EventType.IncrementalSnapshot &&
|
// mouse move or viewport resize can happen on accidental user interference
|
||||||
(s.data.source === IncrementalSource.MouseMove ||
|
// so we ignore them
|
||||||
s.data.source === IncrementalSource.ViewportResize)
|
(s.type === EventType.IncrementalSnapshot &&
|
||||||
|
(s.data.source === IncrementalSource.MouseMove ||
|
||||||
|
s.data.source === IncrementalSource.ViewportResize)) ||
|
||||||
|
// ignore '[vite] connected' messages from vite
|
||||||
|
(s.type === EventType.Plugin &&
|
||||||
|
s.data.plugin === 'rrweb/console@1' &&
|
||||||
|
(s.data.payload as { payload: string[] })?.payload?.find((msg) =>
|
||||||
|
msg.includes('[vite] connected'),
|
||||||
|
))
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user