Skip to content

Commit

Permalink
Added module initial state tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasconstantino committed Aug 30, 2016
1 parent 5c503e7 commit 014a636
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/bootstrap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ test('Boostrap new app with an initial state', assert => {
})
})

test('Boostrap new app with initial state on modules', assert => {
const testModule = { initialState: { foo: 'bar' } }

const app = boot(null, [testModule])

app.then(({action, store}) => {

assert.deepEqual(
store.getState(),
testModule.initialState,
'State is equal to module\'s initial state'
)

assert.end()
})
})

test('Boostrap new app with a module implementing a reducer', assert => {
const initialState = {
foo: 'bar'
Expand Down Expand Up @@ -212,4 +229,4 @@ test('Boostrap new app with a module implementing an enhancer', assert => {

assert.end()
})
})
})

0 comments on commit 014a636

Please sign in to comment.