diff --git a/src/test/update.test.ts b/src/test/update.test.ts index 43fd050..23ed1a8 100644 --- a/src/test/update.test.ts +++ b/src/test/update.test.ts @@ -133,4 +133,9 @@ describe('update', () => { }) }) }) + + test('optional path', () => { + const newState = update(state, ['optional', 'a'], (op) => 123) + expect(newState.optional.a).toBe(123) // the path surely exists now! + }) })