Skip to content

Commit

Permalink
add test for mergeDeep fail
Browse files Browse the repository at this point in the history
  • Loading branch information
YousefED committed May 29, 2023
1 parent 83c98ae commit 856ec70
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/cypress/integration/core/mergeDeep.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ describe('mergeDeep', () => {
expect(merged).to.deep.eq(result)
})

it('should merge when source has null value', () => {
const one = {
a: null,
}
const two = {
a: { c: 3 },
}
const result = {
a: { c: 3 },
}
const merged = mergeDeep(one, two)

expect(merged).to.deep.eq(result)
})

it('should not merge array', () => {
const one = {
a: [1],
Expand Down

0 comments on commit 856ec70

Please sign in to comment.