Skip to content

Commit

Permalink
[add] Test coverage for new options passing
Browse files Browse the repository at this point in the history
  • Loading branch information
nhunzaker committed Mar 27, 2015
1 parent d77297c commit 2db86ba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/__tests__/Microcosm-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,16 @@ describe('Microcosm', function() {
m.deserialize()
})

it ('passes the options argument from the constructor to getInitialState', function() {
class MyApp extends Microcosm {
getInitialState(options) {
return options
}
}

let app = new MyApp('test')

app._state.should.equal('test')
})

})

0 comments on commit 2db86ba

Please sign in to comment.