Skip to content

Commit

Permalink
Merge pull request #12 from managed-components/revert-endpoint
Browse files Browse the repository at this point in the history
Revert endpoint
  • Loading branch information
ad-astra-via authored Jun 21, 2024
2 parents 87c8dbc + a49bc08 commit 0ab0ab3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Hubspot MC event handler works correctly', () => {

it('creates the Hubspot track request correctly', async () => {
const request = fetchedRequests.find((x: any) =>

Check warning on line 90 in src/index.test.ts

View workflow job for this annotation

GitHub Actions / build-test (20.x)

Unexpected any. Specify a different type
x.url.startsWith('https://track-eu1.hubspot.com/__ptbe.gif?')
x.url.startsWith('https://track-eu1.hubspot.com/__ptq.gif?')
)
expect(request).toBeTruthy()
expect(request?.opts?.mode).toEqual('no-cors')
Expand All @@ -97,7 +97,7 @@ describe('Hubspot MC event handler works correctly', () => {

const url = new URL(request.url)

expect(url.pathname).toEqual('/__ptbe.gif')
expect(url.pathname).toEqual('/__ptq.gif')
expect(url.searchParams.get('k')).toEqual('3')
expect(url.searchParams.get('v')).toEqual('1.1')
expect(url.searchParams.get('a')).toEqual(settings.accountId)
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const sendEvent =
client.fetch(
`https://track${getRegionPrefix(
regionPrefix
)}.hubspot.com/__ptbe.gif?${params}`,
)}.hubspot.com/__ptq.gif?${params}`,
{
credentials: 'include',
keepalive: true,
Expand Down
2 changes: 0 additions & 2 deletions vitest.config.ts

This file was deleted.

0 comments on commit 0ab0ab3

Please sign in to comment.