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'
7
7
import { PersistedPriorityQueue } from '../../lib/priority-queue/persisted'
8
8
import { sleep } from '../../test-helpers/sleep'
9
9
import * as Factory from '../../test-helpers/factories'
10
+ import { setGlobalCDNUrl } from '../../lib/parse-cdn'
10
11
11
12
const track = jest . fn ( )
12
13
const identify = jest . fn ( )
@@ -127,10 +128,10 @@ describe('standalone bundle', () => {
127
128
// @ts -ignore ignore Response required fields
128
129
. mockImplementation ( ( ) : Promise < Response > => fetchSettings )
129
130
130
- await AnalyticsBrowser . standalone ( 'my-write-key' )
131
+ await install ( )
131
132
132
133
expect ( unfetch ) . toHaveBeenCalledWith (
133
- 'https://cdn.foo.com/v1/projects/my-write-key /settings'
134
+ 'https://cdn.foo.com/v1/projects/foo /settings'
134
135
)
135
136
} )
136
137
@@ -142,7 +143,7 @@ describe('standalone bundle', () => {
142
143
const mockCdn = 'http://my-overridden-cdn.com'
143
144
144
145
window . analytics . _cdn = mockCdn
145
- await AnalyticsBrowser . standalone ( 'abc' )
146
+ await install ( )
146
147
147
148
expect ( unfetch ) . toHaveBeenCalledWith ( expect . stringContaining ( mockCdn ) )
148
149
} )
You can’t perform that action at this time.
0 commit comments