Skip to content
Myr

chore: added test for #491

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 1913fe8 · Browse files · 1 file+15 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+15 added−0 removed

  • tests:+15 added−0 removed

1 file+15 added−0 removed

modified:__tests__/base.js+15 added
1387 unmodified lines
1388 expect(externalData.x).toBe(5)1389 expect(next.y).toBe(externalData)1390 })13911392 it("does not create new state unnecessary, #491", () => {1393 const a = {highlight: true}1394 const next1 = produce(a, draft => {1395 draft.highlight = false1396 draft.highlight = true1397 })1398 // See explanation in issue1399 expect(next1).not.toBe(a)14001401 const next2 = produce(a, draft => {1402 draft.highlight = true1403 })1404 expect(next2).toBe(a)1405 })14061407 autoFreeze &&1408 test("issue #469, state not frozen", () => {1409 const project = produce(1410 {
532 unmodified lines