Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Feb 5, 2024
1 parent 0fb48a2 commit c40cedd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/__tests__/posthog-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ describe('posthog core', () => {
})

it('sends payloads to overriden endpoint if given', () => {
given.lib.capture('event-name', { foo: 'bar', length: 0 }, { endpoint: '/s/' })
given.lib.capture('event-name', { foo: 'bar', length: 0 }, { _url: 'https://app.posthog.com/s/' })
expect(given.lib._send_request).toHaveBeenCalledWith(
'https://app.posthog.com/s/',
expect.any(Object),
Expand All @@ -266,9 +266,9 @@ describe('posthog core', () => {
)
})

it('sends payloads to overriden endpoint, even if alternative endpoint is set', () => {
it('sends payloads to overriden _url, even if alternative endpoint is set', () => {
given.lib._afterDecideResponse({ analytics: { endpoint: '/i/v0/e/' } })
given.lib.capture('event-name', { foo: 'bar', length: 0 }, { endpoint: '/s/' })
given.lib.capture('event-name', { foo: 'bar', length: 0 }, { _url: 'https://app.posthog.com/s/' })
expect(given.lib._send_request).toHaveBeenCalledWith(
'https://app.posthog.com/s/',
expect.any(Object),
Expand Down

0 comments on commit c40cedd

Please sign in to comment.