plugins.js
This file
Path
__tests__/plugins.js
29 lines · 620 bytes · JavaScript
Last changed by
Merge pull request #1028 from immerjs/immer-10Michel Weststratebefore adoption2ef9a42
History of this fileTake it
The walk stopped after 200 commits: lines older than 6555173 point at it.
Merge pull request #1028 from immerjs/immer-10Michel Weststratebefore adoption2ef9a42
line 1why, one step back1import {produce, produceWithPatches, applyPatches} from "../src/immer"fix: #785 fix type inference for produce incorrectly inferring promise (#786)hardfistbefore adoption6555173
lines 2–29why, one step back23test("error when using Maps", () => {4 expect(() => {5 produce(new Map(), function() {})6 }).toThrowErrorMatchingSnapshot()7})89test("error when using patches - 1", () => {10 expect(() => {11 produce(12 {},13 function() {},14 function() {}15 )16 }).toThrowErrorMatchingSnapshot()17})1819test("error when using patches - 2", () => {20 expect(() => {21 produceWithPatches({}, function() {})22 }).toThrowErrorMatchingSnapshot()23})2425test("error when using patches - 3", () => {26 expect(() => {27 applyPatches({}, [])28 }).toThrowErrorMatchingSnapshot()29})