diff --git a/packages/x-adapter-platform/src/__tests__/__fixtures__/experience-controls.response.ts b/packages/x-adapter-platform/src/__tests__/__fixtures__/experience-controls.response.ts new file mode 100644 index 0000000000..851fab40c9 --- /dev/null +++ b/packages/x-adapter-platform/src/__tests__/__fixtures__/experience-controls.response.ts @@ -0,0 +1,12 @@ +export const platformExperienceControlsResponse = { + numberOfCarousels: 9, + resultsPerCarousels: 24 +}; + +export const experienceControlsResponse = { + controls: { + numberOfCarousels: 9, + resultsPerCarousels: 24 + }, + events: {} +}; diff --git a/packages/x-adapter-platform/src/mappers/responses/__tests__/experience-controls-response.mapper.spec.ts b/packages/x-adapter-platform/src/mappers/responses/__tests__/experience-controls-response.mapper.spec.ts new file mode 100644 index 0000000000..e3e2b9ce56 --- /dev/null +++ b/packages/x-adapter-platform/src/mappers/responses/__tests__/experience-controls-response.mapper.spec.ts @@ -0,0 +1,17 @@ +import { experienceControlsResponseMapper } from '../experience-controls-response.mapper'; +import { PlatformExperienceControlsResponse } from '../../../types'; +import { + experienceControlsResponse, + platformExperienceControlsResponse +} from '../../../__tests__/__fixtures__/experience-controls.response'; + +describe('experienceControlsResponseMapper tests', () => { + it('should map the response', () => { + expect( + experienceControlsResponseMapper( + platformExperienceControlsResponse as unknown as PlatformExperienceControlsResponse, + {} + ) + ).toStrictEqual(experienceControlsResponse); + }); +});