File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ describe('send', function() {
5959 assert . equal ( answer , 'test' )
6060 } )
6161
62+ it ( 'allows lifecycle methods as registered actions' , function ( ) {
63+ let store = {
64+ register ( ) {
65+ return { [ lifecycle . willStart ] : 'test' }
66+ }
67+ }
68+
69+ let answer = send ( store , null , lifecycle . willStart )
70+
71+ assert . equal ( answer , 'test' )
72+ } )
73+
6274 it ( 'ignores methods defined by the store that are not lifecycle methods matching dispatched types' , function ( ) {
6375 let store = {
6476 foo ( ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ exports.mapping = {
1010 'willDeserialize' : 'deserialize'
1111}
1212
13- for ( var type in exports . mapping ) {
13+ for ( let type in exports . mapping ) {
1414 exports [ type ] = { type }
15+ exports [ type ] . toString = ( ) => type
1516}
You can’t perform that action at this time.
0 commit comments