From 19fdec73997dd35669912f92841a447c542157fd Mon Sep 17 00:00:00 2001 From: Sai Sankeerth Date: Wed, 19 Jun 2024 15:53:27 +0530 Subject: [PATCH] chore: fix sfmc transformation test --- src/v0/destinations/sfmc/transform.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/v0/destinations/sfmc/transform.test.js b/src/v0/destinations/sfmc/transform.test.js index 8d382ef649..e182fb0d78 100644 --- a/src/v0/destinations/sfmc/transform.test.js +++ b/src/v0/destinations/sfmc/transform.test.js @@ -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'); @@ -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'); @@ -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'); @@ -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"); @@ -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');