Last active
April 25, 2019 04:27
-
-
Save cartant/7608f289bac95bca603c850b56817b67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { expect } from "chai"; | |
import { produce } from "immer"; | |
const current = [42]; | |
const next = produce(current, draft => { draft.push(54); }); | |
expect(current).to.deep.equal([42]); | |
expect(next).to.deep.equal([42, 54]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment