Skip to content
Myr

test: remove old tests

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

These tests are obsoleted by newer tests.

authored by aleclarson · committed by Alec Larson · parent b053637 · Browse files · 1 file+0 added−49 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+0 added−49 removed

  • tests:+0 added−49 removed

1 file+0 added−49 removed

modified:__tests__/base.js-49 removed
622 unmodified lines
623 room: {elephant: {kiddo: {age: 10, legs: 5}}}624 })625 })626627 it("should not throw error #78", () => {628 const base = {629 arr: [630 {631 id: "100",632 arr: [{id: "1", no: 1}, {id: "2", no: 2}]633 },634 {id: "3", no: 3}635 ]636 }637 const result = produce(base, draft => {638 const base = draft.arr[0]639 draft.arr = draft.arr.slice(0, 1)640 const newArr = {641 id: "101",642 arr: [base, {id: "3"}]643 }644 draft.arr.splice(0, 1, newArr)645 draft.arr[0].arr[1].no = 3646 })647 expect(result).toEqual({648 arr: [649 {650 id: "101",651 arr: [652 {653 id: "100",654 arr: [{id: "1", no: 1}, {id: "2", no: 2}]655 },656 {id: "3", no: 3}657 ]658 }659 ]660 })661 })662663 it("should not throw error #78 - 2", () => {664 const base = {665 arr: [{count: 1}, {count: 2}]666 }667 const result = produce(base, draft => {668 draft.arr = [draft.arr[1]]669 draft.arr[0].count = 1670 })671 expect(result).toEqual({672 arr: [{count: 1}]673 })674 })675627 it("should handle constructor correctly", () => {628 const base = {629 arr: new Array(),630 obj: new Object()
675 unmodified lines