Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Koedijk committed Jan 19, 2025
1 parent 3c3c818 commit a437879
Showing 1 changed file with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ describe('mapGroupsFromDependabotConfigToJobConfig', () => {
expect(result).toBeUndefined();
});

it('should return an empty array if dependencyGroups is an empty object', () => {
it('should return undefined if dependencyGroups is an empty object', () => {
const result = mapGroupsFromDependabotConfigToJobConfig({});
expect(result).toEqual([]);
expect(result).toBeUndefined();
});

it('should filter out undefined groups', () => {
Expand All @@ -21,14 +21,7 @@ describe('mapGroupsFromDependabotConfigToJobConfig', () => {
};

const result = mapGroupsFromDependabotConfigToJobConfig(dependencyGroups);
expect(result).toEqual([
{
name: 'group2',
rules: {
patterns: ['pattern2'],
},
},
]);
expect(result).toHaveLength(1);
});

it('should filter out null groups', () => {
Expand All @@ -40,14 +33,7 @@ describe('mapGroupsFromDependabotConfigToJobConfig', () => {
};

const result = mapGroupsFromDependabotConfigToJobConfig(dependencyGroups);
expect(result).toEqual([
{
name: 'group2',
rules: {
patterns: ['pattern2'],
},
},
]);
expect(result).toHaveLength(1);
});

it('should map dependency group properties correctly', () => {
Expand Down

0 comments on commit a437879

Please sign in to comment.