Skip to content

Commit

Permalink
Test changes because of shift to more synchronous event execution in …
Browse files Browse the repository at this point in the history
…this PR
  • Loading branch information
eoghanmurray committed Apr 13, 2023
1 parent 19da53d commit 3cebc69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rrweb/test/replayer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('replayer', function () {
replayer.play();
replayer['timer']['actions'].length;
`);
expect(actionLength).toEqual(events.length);
expect(actionLength).toEqual(actions.length - 2); // subtract 2 as DomContentLoaded and first FullSnapshot have been rendered synchronously
});

it('will clean actions when pause', async () => {
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('replayer', function () {
replayer['timer']['actions'].length;
`);
expect(actionLength).toEqual(
events.filter((e) => e.timestamp - events[0].timestamp >= 1500).length,
events.filter((e) => e.timestamp - events[0].timestamp > 1500).length,
);
});

Expand All @@ -132,7 +132,7 @@ describe('replayer', function () {
replayer['timer']['actions'].length;
`);
expect(actionLength).toEqual(
events.filter((e) => e.timestamp - events[0].timestamp >= 500).length,
events.filter((e) => e.timestamp - events[0].timestamp > 500).length,
);
});

Expand Down

0 comments on commit 3cebc69

Please sign in to comment.