Skip to content
Myr

added test for #89

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Michel Weststrate · committed by Michel Weststrate · parent 374ad85 · Browse files · 2 files+29 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+29 added−0 removed

  • tests:+25 added−0 removed
  • other:+4 added−0 removed

2 files+29 added−0 removed

modified:__tests__/base.js+25 added
776 unmodified lines
777 expect(next1).not.toBe(base)778 expect(next1.x).toBe(4)779 })780781 it("issue #89", () => {782 const state = {783 users: {784 existingID: {785 loading: false,786 value: "val"787 }788 }789 }790 const nextState = produce(state, draft => {791 draft.users.existingID = {792 ...draft.users.existingID,793 loading: true794 }795 })796 expect(nextState).toEqual({797 users: {798 existingID: {799 loading: true,800 value: "val"801 }802 }803 })804 })805806 afterEach(() => {807 expect(baseState).toBe(origBaseState)808 expect(baseState).toEqual(createBaseState())809 })
21 unmodified lines
modified:changelog.md+4 added