1
+ var Marty = require ( 'marty' ) ;
2
+ var FooHttpAPI = require ( '../apis/fooHttpAPI' ) ;
3
+ var FooConstants = require ( '../constants/fooConstants' ) ;
4
+ var TestConstants = require ( '../constants/testConstants' ) ;
5
+
6
+ var TestActionCreators = Marty . createActionCreators ( {
7
+ createFoo : FooConstants . CREATE_FOO ( function ( foo ) {
8
+ return FooHttpAPI . createFoo ( foo ) ;
9
+ } ) ,
10
+ noDispatch : TestConstants . NO_DISPATCH ( function ( foo , bar ) {
11
+ console . log ( 'NO_DISPATCH' , arguments ) ;
12
+ } ) ,
13
+ dispatch : TestConstants . DISPATCH ( function ( foo , bar ) {
14
+ console . log ( 'DISPATCH' , arguments ) ;
15
+ } ) ,
16
+ promiseThenDispatch : TestConstants . PROMISE_THEN_DISPATCH ( function ( foo , bar ) {
17
+ console . log ( 'PROMISE_THEN_DISPATCH' , arguments ) ;
18
+ } ) ,
19
+ dispatchThenPromise : TestConstants . DISPATCH_THEN_PROMISE ( function ( foo , bar ) {
20
+ console . log ( 'DISPATCH_THEN_PROMISE' , arguments ) ;
21
+ } ) ,
22
+ fail : TestConstants . FAIL ( function ( foo , bar ) {
23
+ console . log ( 'FAIL' , arguments ) ;
24
+ } ) ,
25
+ promiseFail : TestConstants . PROMISE_FAIL ( function ( foo , bar ) {
26
+ console . log ( 'PROMISE_FAIL' , arguments ) ;
27
+ } ) ,
28
+ noStores : TestConstants . NO_STORES ( function ( foo , bar ) {
29
+ console . log ( 'NO_STORES' , arguments ) ;
30
+ } ) ,
31
+ oneStore : TestConstants . ONE_STORE ( function ( foo , bar ) {
32
+ console . log ( 'ONE_STORE' , arguments ) ;
33
+ } ) ,
34
+ multipleStores : TestConstants . MULTIPLE_STORES ( function ( foo , bar ) {
35
+ console . log ( 'MULTIPLE_STORES' , arguments ) ;
36
+ } ) ,
37
+ singleComponent : TestConstants . SINGLE_COMPONENT ( function ( foo , bar ) {
38
+ console . log ( 'SINGLE_COMPONENT' , arguments ) ;
39
+ } ) ,
40
+ multipleComponents : TestConstants . MULTIPLE_COMPONENTS ( function ( foo , bar ) {
41
+ console . log ( 'MULTIPLE_COMPONENTS' , arguments ) ;
42
+ } ) ,
43
+ failInActionHandler : TestConstants . FAIL_IN_ACTION_HANDLER ( function ( foo , bar ) {
44
+ console . log ( 'FAIL_IN_ACTION_HANDLER' , arguments ) ;
45
+ } ) ,
46
+ failInComponent : TestConstants . FAIL_IN_COMPONENT ( function ( foo , bar ) {
47
+ console . log ( 'FAIL_IN_COMPONENT' , arguments ) ;
48
+ } )
49
+ } ) ;
50
+
51
+ module . exports = TestActionCreators ;
0 commit comments