Skip to content

Commit

Permalink
chore: add test to cover undefined values when merging configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss committed Jan 16, 2024
1 parent 19e9f55 commit 23e0155
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/configuration/merge_configurations_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ describe('mergeConfigurations', () => {
expect(result).to.deep.eq({})
})

it('should not override a real value with undefined', () => {
const result = mergeConfigurations(
{
parallel: 2,
},
{
parallel: undefined,
}
)
expect(result).to.deep.eq({ parallel: 2 })
})

describe('additive arrays', () => {
it('should merge two arrays correctly', () => {
const result = mergeConfigurations({ paths: ['a'] }, { paths: ['b'] })
Expand Down

0 comments on commit 23e0155

Please sign in to comment.