Skip to content

Commit

Permalink
assert heap.envId, not heap.appid
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsoinos committed Jan 3, 2025
1 parent a947036 commit 220f853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Heap', () => {
await event.load(Context.system(), {} as Analytics)

expect(destination.initialize).toHaveBeenCalled()
expect(window.heap.appid).toEqual(HEAP_TEST_ENV_ID)
expect(window.heap.envId).toEqual(HEAP_TEST_ENV_ID)
expect(loadScript).toHaveBeenCalledWith(`https://cdn.us.heap-api.com/config/${HEAP_TEST_ENV_ID}/heap_config.js`)
})

Expand All @@ -58,7 +58,7 @@ describe('Heap', () => {
await event.load(Context.system(), {} as Analytics)

expect(destination.initialize).toHaveBeenCalled()
expect(window.heap.appid).toEqual(HEAP_TEST_ENV_ID)
expect(window.heap.envId).toEqual(HEAP_TEST_ENV_ID)
expect(loadScript).toHaveBeenCalledWith(`https://cdn.heapanalytics.com/js/heap-${HEAP_TEST_ENV_ID}.js`)
})

Expand All @@ -74,7 +74,7 @@ describe('Heap', () => {
await event.load(Context.system(), {} as Analytics)

expect(destination.initialize).toHaveBeenCalled()
expect(window.heap.appid).toEqual(HEAP_TEST_ENV_ID)
expect(window.heap.envId).toEqual(HEAP_TEST_ENV_ID)
expect(loadScript).toHaveBeenCalledWith(`https://cdn.heapanalytics.com/config/${HEAP_TEST_ENV_ID}/heap_config.js`)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const initScript = (envId: string, config: UserConfig) => {
envId: string,
clientConfig: UserConfig = { disableTextCapture: false, secureCookie: false }
): void {
window.heap.appid = envId
window.heap.envId = envId
window.heap.clientConfig = clientConfig
window.heap.clientConfig.shouldFetchServerConfig = false
Expand Down

0 comments on commit 220f853

Please sign in to comment.