Skip to content

Commit

Permalink
✅ Add a test for bug #213
Browse files Browse the repository at this point in the history
  • Loading branch information
nlepage committed Jan 15, 2018
1 parent 3083de7 commit 6d365e6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/immutadot/src/path/apply.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,26 @@ describe('path.apply', () => {
'nested.prop',
)
})

it('should initialize unknown props in a list', () => {
immutaTest(
input => {
const output = inc(input, 'nested.{prop1,prop2}.val')
expect(output).toEqual({
nested: {
prop1: { val: 6 },
prop2: { val: 1 },
},
other: {},
})
return output
},
{
nested: { prop1: { val: 5 } },
other: {},
},
'nested.prop1.val',
'nested.prop2.val',
)
})
})

0 comments on commit 6d365e6

Please sign in to comment.