Skip to content
Myr

Tried to reproduce #195

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 d4a165b · Browse files · 1 file+17 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

1 file+17 added−0 removed

  • tests:+17 added−0 removed

1 file+17 added−0 removed

modified:__tests__/base.js+17 added
1256 unmodified lines
1257 })1258 expect(nextState).toEqual([1, 2, 100])1259 })12601261 it("#195 should be able to find items", () => {1262 const state = {1263 items: [1264 {1265 id: 0,1266 task: "drink milk"1267 },1268 {id: 1, task: "eat cookie"}1269 ]1270 }1271 produce(state, draft => {1272 expect(draft.items.find(({id}) => id === 1).task).toBe(1273 "eat cookie"1274 )1275 })1276 })12771278 afterEach(() => {1279 expect(baseState).toBe(origBaseState)1280 expect(baseState).toEqual(createBaseState())1281 })
21 unmodified lines