@@ -89,34 +89,40 @@ test('regular mode', async () => {
89
89
90
90
expect ( fetch ) . toHaveBeenCalledTimes ( 3 ) ;
91
91
92
- expect ( fetch ) . toHaveBeenNthCalledWith ( 1 ,
93
- 'https://sak.userreport.com/publisherId/media/mediaId/ios.json' ) ;
92
+ expect ( fetch ) . toHaveBeenNthCalledWith (
93
+ 1 ,
94
+ 'https://sak.userreport.com/publisherId/media/mediaId/ios.json' ,
95
+ ) ;
94
96
95
- expect ( fetch ) . toHaveBeenNthCalledWith ( 2 ,
97
+ expect ( fetch ) . toHaveBeenNthCalledWith (
98
+ 2 ,
96
99
'https://visitanalytics.userreport.com/hit.gif'
97
100
+ '?t=__FetchMediaCode__'
98
- + '&r =4fzzzxjylrx'
101
+ + '&rnd =4fzzzxjylrx'
99
102
+ '&d=__NativeAdvertisingId__'
100
103
+ '&idfv=__DeviceInfoUniqueId__'
101
- + '&med =__DeviceInfoBundleId__'
104
+ + '&appid =__DeviceInfoBundleId__'
102
105
+ '&os=__DeviceInfoSystemName__'
103
106
+ '&osv=__DeviceInfoSystemVersion__'
104
107
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
105
108
+ '&dr=150x300'
106
- + '&gdpr_consent=__FetchConsent__' ) ;
109
+ + '&gdpr_consent=__FetchConsent__' ,
110
+ ) ;
107
111
108
- expect ( fetch ) . toHaveBeenNthCalledWith ( 3 ,
112
+ expect ( fetch ) . toHaveBeenNthCalledWith (
113
+ 3 ,
109
114
'https://visitanalytics.userreport.com/hit.gif'
110
115
+ '?t=__FetchSectionCode__'
111
- + '&r =4fzzzxjylrx'
116
+ + '&rnd =4fzzzxjylrx'
112
117
+ '&d=__NativeAdvertisingId__'
113
118
+ '&idfv=__DeviceInfoUniqueId__'
114
- + '&med =__DeviceInfoBundleId__'
119
+ + '&appid =__DeviceInfoBundleId__'
115
120
+ '&os=__DeviceInfoSystemName__'
116
121
+ '&osv=__DeviceInfoSystemVersion__'
117
122
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
118
123
+ '&dr=150x300'
119
- + '&gdpr_consent=__FetchConsent__' ) ;
124
+ + '&gdpr_consent=__FetchConsent__' ,
125
+ ) ;
120
126
} ) ;
121
127
122
128
test ( 'legacy idfa' , async ( ) => {
@@ -127,18 +133,20 @@ test('legacy idfa', async () => {
127
133
UserReport . trackScreenView ( ) ,
128
134
] ) ;
129
135
130
- expect ( fetch ) . toHaveBeenNthCalledWith ( 2 ,
136
+ expect ( fetch ) . toHaveBeenNthCalledWith (
137
+ 2 ,
131
138
'https://visitanalytics.userreport.com/hit.gif'
132
139
+ '?t=__FetchMediaCode__'
133
- + '&r =4fzzzxjylrx'
140
+ + '&rnd =4fzzzxjylrx'
134
141
+ '&d=__NativeAdvertisingLegacyId__'
135
142
+ '&idfv=__DeviceInfoUniqueId__'
136
- + '&med =__DeviceInfoBundleId__'
143
+ + '&appid =__DeviceInfoBundleId__'
137
144
+ '&os=__DeviceInfoSystemName__'
138
145
+ '&osv=__DeviceInfoSystemVersion__'
139
146
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
140
147
+ '&dr=150x300'
141
- + '&gdpr_consent=__FetchConsent__' ) ;
148
+ + '&gdpr_consent=__FetchConsent__' ,
149
+ ) ;
142
150
} ) ;
143
151
144
152
test ( 'dnt mode' , async ( ) => {
@@ -154,28 +162,34 @@ test('dnt mode', async () => {
154
162
155
163
expect ( fetch ) . toHaveBeenCalledTimes ( 3 ) ;
156
164
157
- expect ( fetch ) . toHaveBeenNthCalledWith ( 1 ,
158
- 'https://sak.dnt-userreport.com/publisherId/media/mediaId/android.json' ) ;
165
+ expect ( fetch ) . toHaveBeenNthCalledWith (
166
+ 1 ,
167
+ 'https://sak.dnt-userreport.com/publisherId/media/mediaId/android.json' ,
168
+ ) ;
159
169
160
- expect ( fetch ) . toHaveBeenNthCalledWith ( 2 ,
170
+ expect ( fetch ) . toHaveBeenNthCalledWith (
171
+ 2 ,
161
172
'https://visitanalytics.dnt-userreport.com/hit.gif'
162
173
+ '?t=__FetchMediaCode__'
163
- + '&r =4fzzzxjylrx'
164
- + '&med =__DeviceInfoBundleId__'
174
+ + '&rnd =4fzzzxjylrx'
175
+ + '&appid =__DeviceInfoBundleId__'
165
176
+ '&os=__DeviceInfoSystemName__'
166
177
+ '&osv=__DeviceInfoSystemVersion__'
167
178
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
168
179
+ '&dr=150x300'
169
- + '&gdpr_consent=__FetchConsent__' ) ;
180
+ + '&gdpr_consent=__FetchConsent__' ,
181
+ ) ;
170
182
171
- expect ( fetch ) . toHaveBeenNthCalledWith ( 3 ,
183
+ expect ( fetch ) . toHaveBeenNthCalledWith (
184
+ 3 ,
172
185
'https://visitanalytics.dnt-userreport.com/hit.gif'
173
186
+ '?t=__FetchSectionCode__'
174
- + '&r =4fzzzxjylrx'
175
- + '&med =__DeviceInfoBundleId__'
187
+ + '&rnd =4fzzzxjylrx'
188
+ + '&appid =__DeviceInfoBundleId__'
176
189
+ '&os=__DeviceInfoSystemName__'
177
190
+ '&osv=__DeviceInfoSystemVersion__'
178
191
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
179
192
+ '&dr=150x300'
180
- + '&gdpr_consent=__FetchConsent__' ) ;
193
+ + '&gdpr_consent=__FetchConsent__' ,
194
+ ) ;
181
195
} ) ;
0 commit comments