Skip to content

Commit

Permalink
Add test for initial store state
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmechanic committed Aug 19, 2016
1 parent e0878db commit af46dd3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import assert from 'assert'
import { createStore } from 'redux'

import { ignoreActions, filterActions } from '../src/index'

let reducer = (state, action) => {
Expand Down Expand Up @@ -86,4 +88,13 @@ describe('filterActions()', () => {
filteringReducer('testing', action),
'bar-state')
})

it('should return an initial state when a redux store is created', () => {
let filteringReducer = filterActions(reducer, ['BAR'])
let store = createStore(filteringReducer)

assert.equal(
store.getState(),
reducer(undefined, {}))
})
})

0 comments on commit af46dd3

Please sign in to comment.