Skip to content

Commit

Permalink
test: response mapper test
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv committed Oct 6, 2023
1 parent 46b7fbe commit e411f0a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const platformExperienceControlsResponse = {
numberOfCarousels: 9,
resultsPerCarousels: 24
};

export const experienceControlsResponse = {
controls: {
numberOfCarousels: 9,
resultsPerCarousels: 24
},
events: {}
};
Original file line number Diff line number Diff line change
@@ -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);
});
});

0 comments on commit e411f0a

Please sign in to comment.