Skip to content

Commit

Permalink
Update test to not reference same object twice
Browse files Browse the repository at this point in the history
  • Loading branch information
James Allen committed May 10, 2022
1 parent 18809a6 commit 4f77f40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/regressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 4f77f40

Please sign in to comment.