From 4f77f40401173081a7ac02a98afcd491eafb1415 Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 10 May 2022 21:03:04 +0100 Subject: [PATCH] Update test to not reference same object twice --- __tests__/regressions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/regressions.js b/__tests__/regressions.js index 70c0e0de..8bc587e2 100644 --- a/__tests__/regressions.js +++ b/__tests__/regressions.js @@ -256,13 +256,13 @@ function runBaseTest(name, useProxies, autoFreeze, useListener) { const state = { foo: { bar: { - baz: 1 + baz: "banana" } } } const newState = produce(state, draft => { draft.foo = produce(draft.foo, fooDraft => { - fooDraft.baz = fooDraft.bar.baz + fooDraft.baz = fooDraft.bar.baz.replace("banana", "apple") }) draft.foo = produce(draft.foo, fooDraft => { /* another produce call makes this fail */