Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Nov 14, 2023
1 parent bdd1877 commit f16bbad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/__tests__/extensions/replay/sessionrecording.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,8 @@ describe('SessionRecording', () => {
const { sessionStartTimestamp } = sessionManager.checkAndGetSessionAndWindowId(true)

// if we have some data in the buffer and the buffer has a session id but then the session id changes
// then the session duration will be negative and we will never flush the buffer
// then the session duration will be negative, and we will never flush the buffer
// this setup isn't quite that but does simulate the behaviour closely enough
_emit(createIncrementalSnapshot({ data: { source: 1 }, timestamp: sessionStartTimestamp - 1000 }))

expect(sessionRecording['sessionDuration']).toBe(-1000)
Expand Down

0 comments on commit f16bbad

Please sign in to comment.