Skip to content

Commit

Permalink
add install
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Oct 26, 2022
1 parent 4cbe69c commit 7a8da6e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ describe('standalone bundle', () => {
// @ts-ignore ignore Response required fields
.mockImplementation((): Promise<Response> => fetchSettings)

await AnalyticsBrowser.standalone('my-write-key')
await install()

expect(unfetch).toHaveBeenCalledWith(
'https://cdn.foo.com/v1/projects/my-write-key/settings'
'https://cdn.foo.com/v1/projects/foo/settings'
)
})

Expand All @@ -142,7 +142,7 @@ describe('standalone bundle', () => {
const mockCdn = 'http://my-overridden-cdn.com'

window.analytics._cdn = mockCdn
await AnalyticsBrowser.standalone('abc')
await install()

expect(unfetch).toHaveBeenCalledWith(expect.stringContaining(mockCdn))
})
Expand Down

0 comments on commit 7a8da6e

Please sign in to comment.