Skip to content

Commit

Permalink
test: ensure options aren't mutated
Browse files Browse the repository at this point in the history
re #173
  • Loading branch information
Rebecca Stevens authored and RebeccaStevens committed Nov 27, 2020
1 parent fbf00cc commit 13d6db1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,3 +671,12 @@ test(`Falsey properties should be mergeable`, (t) => {
t.ok(customMergeWasCalled, `custom merge function was called`)
t.end()
})

test(`should not mutate options`, (t) => {
const options = {}

merge({}, {}, options)

t.deepEqual(options, {})
t.end()
})

0 comments on commit 13d6db1

Please sign in to comment.