Skip to content
Myr

Fix the test

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

authored by Stefan Wille · committed by Stefan Wille · parent 37877e6 · Browse files · 1 file+6 added−6 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+6 added−6 removed

  • tests:+6 added−6 removed

1 file+6 added−6 removed

modified:__tests__/base.js+6 added-6 removed
46 unmodified lines
47 })4849 it("should preserve type", () => {50 const nextState = produce(baseState, s => {51 expect(Array.isArray(s)).toBe(true)52 expect(s.protoType).toBe(Object)51 expect(Object.getPrototypeOf(s)).toBe(Object.prototype)52 expect(Array.isArray(s.anArray)).toBe(true)53 s.anArray.push(3)54 s.aProp = "hello world"55 expect(Array.isArray(s)).toBe(true)56 expect(s.protoType).toBe(Object)55 expect(Object.getPrototypeOf(s)).toBe(Object.prototype)56 expect(Array.isArray(s.anArray)).toBe(true)57 })58 expect(Array.isArray(nextState)).toBe(true)59 expect(nextState.protoType).toBe(Object)58 expect(Object.getPrototypeOf(nextState)).toBe(Object.prototype)59 expect(Array.isArray(nextState.anArray)).toBe(true)60 })6162 it("deep change bubbles up", () => {63 const nextState = produce(baseState, s => {
887 unmodified lines