Skip to content

Commit

Permalink
add test for reducers object
Browse files Browse the repository at this point in the history
  • Loading branch information
madisvain committed Sep 9, 2017
1 parent 13a4132 commit 7f72e89
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/defaults.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ describe('mirror.defaults', () => {
}).not.toThrow()
})

it('throws if reducers is not object', () => {
expect(() => {
defaults({
reducers: () => []
})
}).toThrow(/invalid/)

expect(() => {
defaults({
reducers: {}
})
}).not.toThrow()
})

it('throws if an addEffect is not a function that returns a function', () => {
expect(() => {
defaults({
Expand Down

0 comments on commit 7f72e89

Please sign in to comment.