Skip to content
Myr

Merge pull request #157 from stefanwille/fix-148-default-returned-value

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

Fix #148: default returned value

authored by Michel Weststrate · committed by GitHub · parents 89ee9de, 9e8edf8 · Browse files · 2 files+22 added−3 removed
This commit

State

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

Diff stats

2 files+22 added−3 removed

  • tests:+16 added−0 removed
  • other:+6 added−3 removed

2 files+22 added−3 removed

modified:__tests__/base.js+16 added
903 unmodified lines
904 const next = reducer(base, {type: "SET_STARTING_DOTS"})905 expect(next).toEqual({dots: base.availableStartingDots})906 })907908 it("should return an unmodified primitive baseState (#148)", () => {909 const baseState = "some string"910 const nextState = produce(baseState, () => {911 /* no modification */912 })913 expect(nextState).toBe(baseState)914 })915916 it("should return an unmodified null baseState (#148)", () => {917 const baseState = null918 const nextState = produce(baseState, () => {919 /* no modification */920 })921 expect(nextState).toBe(baseState)922 })923924 it("immer should have no dependencies", () => {925 expect(require("../package.json").dependencies).toEqual(undefined)926 })927
25 unmodified lines
modified:src/immer.js+6 added-3 removed