Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Nov 3, 2023
1 parent a98df23 commit 4341121
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/session-props.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SessionPropsManager, StoredSessionSourceProps } from '../session-props'
import { SessionPropsManager, SessionSourceProps, StoredSessionSourceProps } from '../session-props'
import { SessionIdManager } from '../sessionid'
import { PostHogPersistence } from '../posthog-persistence'

Expand Down Expand Up @@ -36,7 +36,7 @@ describe('Session Props Manager', () => {
const utmSource = 'some-utm-source'
const sessionId = 'session-id'
const { onSessionId, generateProps, persistenceRegister } = createSessionPropsManager()
generateProps.mockReturnValue({ utm_source: utmSource })
generateProps.mockReturnValue({ s: utmSource } as SessionSourceProps)
const callback = onSessionId.mock.calls[0][0]

// act
Expand Down
2 changes: 1 addition & 1 deletion src/session-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { CLIENT_SESSION_PROPS } from './constants'
import { _strip_empty_properties } from './utils'

// this might be stored in a cookie with a hard 4096 byte limit, so save characters on key names
interface SessionSourceProps {
export interface SessionSourceProps {
p: string // initial pathname
r: string // referring domain
m?: string // utm medium
Expand Down

0 comments on commit 4341121

Please sign in to comment.