Skip to content

Commit

Permalink
chore: fix sfmc transformation test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Jun 19, 2024
1 parent a1f4f0f commit 19fdec7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/v0/destinations/sfmc/transform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('responseBuilderSimple', () => {
name: 'Identify',
};

const response = await responseBuilderSimple(message, category, destination);
const response = await responseBuilderSimple({ message, destination }, category);

expect(response).toHaveLength(2);
expect(response[0]).toHaveProperty('endpoint');
Expand All @@ -58,7 +58,7 @@ describe('responseBuilderSimple', () => {
};

try {
await responseBuilderSimple(message, category, destination);
await responseBuilderSimple({ message, destination }, category);
} catch (e) {
expect(e).toBeInstanceOf(ConfigurationError);
expect(e.message).toBe('Event name is required for track events');
Expand All @@ -77,7 +77,7 @@ describe('responseBuilderSimple', () => {
name: 'Track',
};
try {
await responseBuilderSimple(message, category, destination);
await responseBuilderSimple({ message, destination }, category);
} catch (e) {
expect(e).toBeInstanceOf(ConfigurationError);
expect(e.message).toBe('Event not mapped for this track call');
Expand All @@ -96,7 +96,7 @@ describe('responseBuilderSimple', () => {
};

try {
await responseBuilderSimple(message, category, destination);
await responseBuilderSimple({ message, destination }, category);
} catch (e) {
expect(e).toBeInstanceOf(ConfigurationError);
expect(e.message).toBe("Event type 'unsupported' not supported");
Expand All @@ -116,7 +116,7 @@ describe('responseBuilderSimple', () => {
name: 'Track',
};

const response = await responseBuilderSimple(message, category, destination);
const response = await responseBuilderSimple({ message, destination }, category);
expect(response).toHaveProperty('endpoint');
expect(response).toHaveProperty('method');
expect(response).toHaveProperty('body.JSON');
Expand Down

0 comments on commit 19fdec7

Please sign in to comment.