Skip to content

Commit

Permalink
test: add new mapping test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Mhp23 committed Feb 26, 2024
1 parent 5040fb2 commit 09e4841
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions __tests__/mapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,41 @@ describe('linear and recursive mapping tests', () => {
expect(recursiveMapping('style')).toEqual('style');
});

it('should map empty object and nested objects correctly', () => {
expect(linearMapping({})).toEqual({});
expect(
linearMapping({
container: {},
text: {},
box: {
transoform: [],
},
})
).toEqual({
container: {},
text: {},
box: {
transoform: [],
},
});
expect(recursiveMapping({})).toEqual({});
expect(
recursiveMapping({
container: {},
text: {},
box: {
transoform: [],
},
})
).toEqual({
container: {},
text: {},
box: {
transoform: [],
},
});
});

it('should map an object correctly', () => {
const input = {
container: {
Expand Down

0 comments on commit 09e4841

Please sign in to comment.