Skip to content

Commit

Permalink
chore: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Oct 20, 2023
1 parent 1a8135c commit 30fe120
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions apps/app/src/lib/__tests__/util.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { deepExtendRemovingUndefined } from '../util'

test('deepExtendRemovingUndefined', () => {
{
const target = {
a: 1,
}
deepExtendRemovingUndefined(target, {
b: 2,
})
expect(target).toStrictEqual({ a: 1, b: 2 })
}
{
const target = {
a: [1, 2, 3],
}
deepExtendRemovingUndefined(target, {
a: [4, 5, 6],
})
expect(target).toStrictEqual({ a: [4, 5, 6] })
}
})

0 comments on commit 30fe120

Please sign in to comment.