diff --git a/packages/bruno-electron/tests/utils/common.spec.js b/packages/bruno-electron/tests/utils/common.spec.js index 0c69a4c50..077aac16d 100644 --- a/packages/bruno-electron/tests/utils/common.spec.js +++ b/packages/bruno-electron/tests/utils/common.spec.js @@ -24,25 +24,25 @@ describe('utils: flattenDataForDotNotation', () => { { name: 'Bob', age: 28 }, ], }; - + const expectedOutput = { 'users[0].name': 'Alice', 'users[0].age': 25, 'users[1].name': 'Bob', 'users[1].age': 28, }; - + expect(flattenDataForDotNotation(input)).toEqual(expectedOutput); }); - + test('Flatten an empty object', () => { const input = {}; - + const expectedOutput = {}; - + expect(flattenDataForDotNotation(input)).toEqual(expectedOutput); }); - + test('Flatten an object with nested objects', () => { const input = { person: { @@ -53,16 +53,16 @@ describe('utils: flattenDataForDotNotation', () => { }, }, }; - + const expectedOutput = { 'person.name': 'Alice', 'person.address.city': 'New York', 'person.address.zipcode': '10001', }; - + expect(flattenDataForDotNotation(input)).toEqual(expectedOutput); }); - + test('Flatten an object with arrays of objects', () => { const input = { teams: [ @@ -70,7 +70,7 @@ describe('utils: flattenDataForDotNotation', () => { { name: 'Team B', members: ['Charlie', 'David'] }, ], }; - + const expectedOutput = { 'teams[0].name': 'Team A', 'teams[0].members[0]': 'Alice', @@ -79,7 +79,7 @@ describe('utils: flattenDataForDotNotation', () => { 'teams[1].members[0]': 'Charlie', 'teams[1].members[1]': 'David', }; - + expect(flattenDataForDotNotation(input)).toEqual(expectedOutput); }); }); \ No newline at end of file