Skip to content

Commit

Permalink
chore: format koala testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauravudia committed Mar 12, 2024
1 parent 04a3073 commit aaf80f0
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 69 deletions.
58 changes: 31 additions & 27 deletions test/integrations/destinations/koala/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const data = [
value: 10,
},
context: {
network: 'wifi'
network: 'wifi',
},
originalTimestamp: '2024-01-23T08:35:17.562Z',
sentAt: '2024-01-23T08:35:17.562Z',
Expand All @@ -58,20 +58,22 @@ export const data = [
JSON: {
ip: '192.11.22.33',
email: '[email protected]',
events: [{
type: 'track',
event: 'User Signed Up',
sent_at: '2024-01-23T08:35:17.562Z',
message_id: '84e26acc-56a5-4835-8233-591137fca468',
properties: {
email: '[email protected]',
label: 'test',
value: 10,
},
context: {
network: 'wifi'
events: [
{
type: 'track',
event: 'User Signed Up',
sent_at: '2024-01-23T08:35:17.562Z',
message_id: '84e26acc-56a5-4835-8233-591137fca468',
properties: {
email: '[email protected]',
label: 'test',
value: 10,
},
context: {
network: 'wifi',
},
},
}]
],
},
},
endpoint: 'https://api2.getkoala.com/web/projects/kkooaallaa321/batch',
Expand Down Expand Up @@ -127,7 +129,7 @@ export const data = [
postalCode: '94107',
},
email: '[email protected]',
ko_profile_id: 'xxxx-2222-xxxx-xxxx'
ko_profile_id: 'xxxx-2222-xxxx-xxxx',
},
originalTimestamp: '2024-01-23T08:35:17.342Z',
sentAt: '2024-01-23T08:35:35.234Z',
Expand All @@ -153,20 +155,22 @@ export const data = [
JSON: {
email: '[email protected]',
profile_id: 'xxxx-2222-xxxx-xxxx',
identifies: [{
type: 'identify',
sent_at: '2024-01-23T08:35:17.342Z',
traits: {
FirstName: 'John',
LastName: 'Doe',
address: {
city: 'San Francisco',
state: 'CA',
postalCode: '94107',
identifies: [
{
type: 'identify',
sent_at: '2024-01-23T08:35:17.342Z',
traits: {
FirstName: 'John',
LastName: 'Doe',
address: {
city: 'San Francisco',
state: 'CA',
postalCode: '94107',
},
email: '[email protected]',
},
email: '[email protected]',
},
}],
],
},
},
endpoint: 'https://api2.getkoala.com/web/projects/kkooaallaa321/batch',
Expand Down
88 changes: 46 additions & 42 deletions test/integrations/destinations/koala/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ export const data = [
type: 'track',
messageId: '84e26acc-56a5-4835-8233-591137fca468',
traits: {
email: '[email protected]'
email: '[email protected]',
},
properties: {
label: 'test',
value: 10,
},
context: {
network: 'wifi'
network: 'wifi',
},
originalTimestamp: '2024-01-23T08:35:17.562Z',
sentAt: '2024-01-23T08:35:17.562Z',
Expand All @@ -44,8 +44,8 @@ export const data = [
jobId: 1,
userId: 'u1',
destinationId: 'destId',
workspaceId: 'wspId'
}
workspaceId: 'wspId',
},
},
{
destination: {
Expand All @@ -65,14 +65,14 @@ export const data = [
type: 'track',
messageId: '8bc79b03-2a5c-4615-b2da-54c0aaaaaae8',
traits: {
ko_profile_id: '123456'
ko_profile_id: '123456',
},
properties: {
attr1: 'foo',
attr2: 'bar'
attr2: 'bar',
},
context: {
network: 'wifi'
network: 'wifi',
},
originalTimestamp: '2024-01-23T08:35:17.562Z',
sentAt: '2024-01-23T08:35:17.562Z',
Expand All @@ -82,14 +82,14 @@ export const data = [
jobId: 2,
userId: 'u1',
destinationId: 'destId',
workspaceId: 'wspId'
}
workspaceId: 'wspId',
},
},
],
destType: 'koala',
},
method: 'POST'
}
method: 'POST',
},
},
output: {
response: {
Expand All @@ -105,19 +105,21 @@ export const data = [
JSON: {
ip: '192.11.22.33',
email: '[email protected]',
events: [{
type: 'track',
event: 'User Signed Up',
sent_at: '2024-01-23T08:35:17.562Z',
message_id: '84e26acc-56a5-4835-8233-591137fca468',
properties: {
label: 'test',
value: 10,
events: [
{
type: 'track',
event: 'User Signed Up',
sent_at: '2024-01-23T08:35:17.562Z',
message_id: '84e26acc-56a5-4835-8233-591137fca468',
properties: {
label: 'test',
value: 10,
},
context: {
network: 'wifi',
},
},
context: {
network: 'wifi'
},
}]
],
},
},
endpoint: 'https://api2.getkoala.com/web/projects/kkooaallaa321/batch',
Expand Down Expand Up @@ -153,19 +155,21 @@ export const data = [
JSON: {
ip: '192.11.55.1',
profile_id: '123456',
events: [{
type: 'track',
event: 'User Deleted account',
sent_at: '2024-01-23T08:35:17.562Z',
message_id: '8bc79b03-2a5c-4615-b2da-54c0aaaaaae8',
properties: {
attr1: 'foo',
attr2: 'bar'
},
context: {
network: 'wifi'
events: [
{
type: 'track',
event: 'User Deleted account',
sent_at: '2024-01-23T08:35:17.562Z',
message_id: '8bc79b03-2a5c-4615-b2da-54c0aaaaaae8',
properties: {
attr1: 'foo',
attr2: 'bar',
},
context: {
network: 'wifi',
},
},
}]
],
},
},
endpoint: 'https://api2.getkoala.com/web/projects/kkooaallaa321/batch',
Expand All @@ -191,10 +195,10 @@ export const data = [
},
},
},
}
]
}
}
}
}
]
},
],
},
},
},
},
];

0 comments on commit aaf80f0

Please sign in to comment.