File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/browser/src/browser/__tests__ Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import unfetch from 'unfetch'
77import { PersistedPriorityQueue } from '../../lib/priority-queue/persisted'
88import { sleep } from '../../test-helpers/sleep'
99import * as Factory from '../../test-helpers/factories'
10+ import { setGlobalCDNUrl } from '../../lib/parse-cdn'
1011
1112const track = jest . fn ( )
1213const identify = jest . fn ( )
@@ -127,10 +128,10 @@ describe('standalone bundle', () => {
127128 // @ts -ignore ignore Response required fields
128129 . mockImplementation ( ( ) : Promise < Response > => fetchSettings )
129130
130- await AnalyticsBrowser . standalone ( 'my-write-key' )
131+ await install ( )
131132
132133 expect ( unfetch ) . toHaveBeenCalledWith (
133- 'https://cdn.foo.com/v1/projects/my-write-key /settings'
134+ 'https://cdn.foo.com/v1/projects/foo /settings'
134135 )
135136 } )
136137
@@ -142,7 +143,7 @@ describe('standalone bundle', () => {
142143 const mockCdn = 'http://my-overridden-cdn.com'
143144
144145 window . analytics . _cdn = mockCdn
145- await AnalyticsBrowser . standalone ( 'abc' )
146+ await install ( )
146147
147148 expect ( unfetch ) . toHaveBeenCalledWith ( expect . stringContaining ( mockCdn ) )
148149 } )
You can’t perform that action at this time.
0 commit comments