@segment/analytics-browser-actions-braze 1.100.1-staging-19c562e5d.0 → 1.100.1-staging-9b8c99e3c.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segment/analytics-browser-actions-braze",
3
- "version": "1.100.1-staging-19c562e5d.0",
3
+ "version": "1.100.1-staging-9b8c99e3c.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -35,11 +35,11 @@
35
35
  "dependencies": {
36
36
  "@braze/web-sdk": "npm:@braze/web-sdk@^5",
37
37
  "@braze/web-sdk-v3": "npm:@braze/web-sdk@^3.5.1",
38
- "@segment/actions-core": "3.159.1-staging-19c562e5d.0",
39
- "@segment/browser-destination-runtime": "1.88.1-staging-19c562e5d.0"
38
+ "@segment/actions-core": "3.159.1-staging-7fda741b1.0",
39
+ "@segment/browser-destination-runtime": "1.88.1-staging-7fda741b1.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@segment/analytics-next": ">=1.55.0"
43
43
  },
44
- "gitHead": "9964fa3f8e73ff4c856292e725d2400acc4d3eec"
44
+ "gitHead": "19660a3246f307f4bf6b50192e57071751044be3"
45
45
  }
@@ -136,4 +136,34 @@ describe('initialization', () => {
136
136
  expect(openSessionSpy).toHaveBeenCalled()
137
137
  expect(logCustomEventSpy).toHaveBeenCalledWith('FIFA', { goat: 'deno' })
138
138
  })
139
+
140
+ test('passes devicePropertyAllowlist to Braze SDK initialization', async () => {
141
+ const devicePropertyAllowlist = ['os', 'browser']
142
+ const [event] = await brazeDestination({
143
+ api_key: 'b_123',
144
+ endpoint: 'endpoint',
145
+ sdkVersion: '3.5',
146
+ doNotLoadFontAwesome: true,
147
+ devicePropertyAllowlist,
148
+ subscriptions: [
149
+ {
150
+ partnerAction: 'trackEvent',
151
+ name: 'Track Event',
152
+ enabled: true,
153
+ subscribe: 'type = "track"',
154
+ mapping: {
155
+ eventName: { '@path': '$.event' },
156
+ eventProperties: { '@path': '$.properties' }
157
+ }
158
+ }
159
+ ]
160
+ })
161
+
162
+ const initializeSpy = jest.spyOn(destination, 'initialize')
163
+ await event.load(Context.system(), {} as Analytics)
164
+
165
+ // Check that the config passed to initialize contains the allowlist
166
+ const callArgs = initializeSpy.mock.calls[0][0]?.settings || {}
167
+ expect(callArgs.devicePropertyAllowlist).toEqual(devicePropertyAllowlist)
168
+ })
139
169
  })