Skip to content

Commit

Permalink
chore: increase test converage (rudderlabs#2254)
Browse files Browse the repository at this point in the history
chore: increase test converage
  • Loading branch information
aashishmalik authored Jun 9, 2023
1 parent dd69dbc commit 78ce4e2
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 0 deletions.
136 changes: 136 additions & 0 deletions test/__tests__/data/braze_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -1610,5 +1610,141 @@
"type": "track",
"userId": ""
}
},
{
"message": {
"type": "group",
"event": "Order Completed",
"sentAt": "2020-09-14T12:09:37.491Z",
"userId": "Randomuser2222",
"channel": "web",
"context": {
"os": {
"name": "",
"version": ""
},
"app": {
"name": "RudderLabs JavaScript SDK",
"build": "1.0.0",
"version": "1.1.3",
"namespace": "com.rudderlabs.javascript"
},
"page": {
"url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html",
"path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html",
"title": "Fullstory Test",
"search": "",
"referrer": ""
},
"locale": "en-GB",
"screen": {
"density": 2
},
"traits": {
"email": "manashi@gmaiol.com"
},
"library": {
"name": "RudderLabs JavaScript SDK",
"version": "1.1.3"
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
},
"messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb",
"groupId": "1234",
"traits": {
"phone": "5055077683",
"subscriptionState": "subscribed"
},
"anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea",
"integrations": {
"All": true
},
"originalTimestamp": "2020-09-14T12:09:37.491Z"
},
"destination": {
"Config": {
"restApiKey": "9432f11f70f8ce386f5110c8c924b3ec4f825256",
"prefixProperties": true,
"useNativeSDK": false,
"enableSubscriptionGroupInGroupCall": true
},
"DestinationDefinition": {
"DisplayName": "Braze",
"ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie",
"Name": "BRAZE"
},
"Enabled": true,
"ID": "1WhcOCGgj9asZu850HvugU2C3Aq",
"Name": "Braze",
"Transformations": []
}
},
{
"message": {
"type": "group",
"event": "Order Completed",
"sentAt": "2020-09-14T12:09:37.491Z",
"userId": "Randomuser2222",
"channel": "web",
"context": {
"os": {
"name": "",
"version": ""
},
"app": {
"name": "RudderLabs JavaScript SDK",
"build": "1.0.0",
"version": "1.1.3",
"namespace": "com.rudderlabs.javascript"
},
"page": {
"url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html",
"path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html",
"title": "Fullstory Test",
"search": "",
"referrer": ""
},
"locale": "en-GB",
"screen": {
"density": 2
},
"traits": {
"email": "manashi@gmaiol.com"
},
"library": {
"name": "RudderLabs JavaScript SDK",
"version": "1.1.3"
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
},
"messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb",
"groupId": "1234",
"traits": {
"email": "abc@test.com",
"subscriptionState": "unsubscribed"
},
"anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea",
"integrations": {
"All": true
},
"originalTimestamp": "2020-09-14T12:09:37.491Z"
},
"destination": {
"Config": {
"restApiKey": "9432f11f70f8ce386f5110c8c924b3ec4f825256",
"prefixProperties": true,
"useNativeSDK": false,
"enableSubscriptionGroupInGroupCall": true
},
"DestinationDefinition": {
"DisplayName": "Braze",
"ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie",
"Name": "BRAZE"
},
"Enabled": true,
"ID": "1WhcOCGgj9asZu850HvugU2C3Aq",
"Name": "Braze",
"Transformations": []
}
}
]
52 changes: 52 additions & 0 deletions test/__tests__/data/braze_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -874,5 +874,57 @@
},
"files": {},
"userId": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc"
},
{
"body": {
"FORM": {},
"JSON": {
"external_id": [
"Randomuser2222"
],
"phone": "5055077683",
"subscription_group_id": "1234",
"subscription_state": "subscribed"
},
"JSON_ARRAY": {},
"XML": {}
},
"endpoint": "https://rest.fra-01.braze.eu/subscription/status/set",
"files": {},
"headers": {
"Accept": "application/json",
"Authorization": "Bearer 9432f11f70f8ce386f5110c8c924b3ec4f825256",
"Content-Type": "application/json"
},
"method": "POST",
"params": {},
"type": "REST",
"version": "1"
},
{
"body": {
"FORM": {},
"JSON": {
"external_id": [
"Randomuser2222"
],
"email": "abc@test.com",
"subscription_group_id": "1234",
"subscription_state": "unsubscribed"
},
"JSON_ARRAY": {},
"XML": {}
},
"endpoint": "https://rest.fra-01.braze.eu/subscription/status/set",
"files": {},
"headers": {
"Accept": "application/json",
"Authorization": "Bearer 9432f11f70f8ce386f5110c8c924b3ec4f825256",
"Content-Type": "application/json"
},
"method": "POST",
"params": {},
"type": "REST",
"version": "1"
}
]

0 comments on commit 78ce4e2

Please sign in to comment.