@@ -3,85 +3,85 @@ import { fromJS, List, Map, Set } from 'immutable';
3
3
import { composeReducers } from './compose-reducers' ;
4
4
5
5
xdescribe ( 'composeReducers' , ( ) => {
6
- const compose = ( s1 : any , s2 : any , s3 : any ) => {
7
- const r1 = ( state = s1 ) => state ;
8
- const r2 = ( state = s2 ) => state ;
9
- const r3 = ( state = s3 ) => state ;
6
+ const compose = ( s1 : any , s2 : any , s3 : any ) => {
7
+ const r1 = ( state = s1 ) => state ;
8
+ const r2 = ( state = s2 ) => state ;
9
+ const r3 = ( state = s3 ) => state ;
10
10
11
- const reducer = composeReducers ( r1 , r2 , r3 ) ;
11
+ const reducer = composeReducers ( r1 , r2 , r3 ) ;
12
12
13
- return reducer ( undefined , { type : '' } ) ;
14
- } ;
13
+ return reducer ( undefined , { type : '' } ) ;
14
+ } ;
15
15
16
- it ( 'can compose plain-object initial states' , ( ) => {
17
- const state = compose (
18
- { a : 1 } ,
19
- { b : 1 } ,
20
- { c : 1 } ,
21
- ) ;
22
- expect ( state ) . toBeDefined ( ) ;
23
- expect ( state ) . toEqual ( { a : 1 , b : 1 , c : 1 } ) ;
24
- } ) ;
16
+ it ( 'can compose plain-object initial states' , ( ) => {
17
+ const state = compose (
18
+ { a : 1 } ,
19
+ { b : 1 } ,
20
+ { c : 1 } ,
21
+ ) ;
22
+ expect ( state ) . toBeDefined ( ) ;
23
+ expect ( state ) . toEqual ( { a : 1 , b : 1 , c : 1 } ) ;
24
+ } ) ;
25
25
26
- it ( 'can compose array states' , ( ) => {
27
- const state = compose (
28
- [ 1 ] ,
29
- [ 2 ] ,
30
- [ 3 ] ,
31
- ) ;
32
- expect ( state ) . toBeDefined ( ) ;
33
- expect ( state ) . toEqual ( [ 1 , 2 , 3 ] ) ;
34
- } ) ;
26
+ it ( 'can compose array states' , ( ) => {
27
+ const state = compose (
28
+ [ 1 ] ,
29
+ [ 2 ] ,
30
+ [ 3 ] ,
31
+ ) ;
32
+ expect ( state ) . toBeDefined ( ) ;
33
+ expect ( state ) . toEqual ( [ 1 , 2 , 3 ] ) ;
34
+ } ) ;
35
35
36
- it ( 'can compose Immutable::Map initial states' , ( ) => {
37
- const state = compose (
38
- fromJS ( { a : 1 } ) ,
39
- fromJS ( { b : 1 } ) ,
40
- fromJS ( { c : 1 } ) ,
41
- ) ;
42
- expect ( Map . isMap ( state ) ) . toEqual ( true ) ;
36
+ it ( 'can compose Immutable::Map initial states' , ( ) => {
37
+ const state = compose (
38
+ fromJS ( { a : 1 } ) ,
39
+ fromJS ( { b : 1 } ) ,
40
+ fromJS ( { c : 1 } ) ,
41
+ ) ;
42
+ expect ( Map . isMap ( state ) ) . toEqual ( true ) ;
43
43
44
- const plain = state . toJS ( ) ;
45
- expect ( plain ) . not . toBeNull ( ) ;
46
- expect ( plain ) . toEqual ( { a : 1 , b : 1 , c : 1 } ) ;
47
- } ) ;
44
+ const plain = state . toJS ( ) ;
45
+ expect ( plain ) . not . toBeNull ( ) ;
46
+ expect ( plain ) . toEqual ( { a : 1 , b : 1 , c : 1 } ) ;
47
+ } ) ;
48
48
49
- it ( 'can compose Immutable::Set initial states' , ( ) => {
50
- const state = compose (
51
- Set . of ( 1 , 2 , 3 ) ,
52
- Set . of ( 4 , 5 , 6 ) ,
53
- Set . of ( ) ,
54
- ) ;
55
- expect ( Set . isSet ( state ) ) . toEqual ( true ) ;
49
+ it ( 'can compose Immutable::Set initial states' , ( ) => {
50
+ const state = compose (
51
+ Set . of ( 1 , 2 , 3 ) ,
52
+ Set . of ( 4 , 5 , 6 ) ,
53
+ Set . of ( ) ,
54
+ ) ;
55
+ expect ( Set . isSet ( state ) ) . toEqual ( true ) ;
56
56
57
- const plain = state . toJS ( ) ;
58
- expect ( plain ) . not . toBeNull ( ) ;
59
- expect ( plain ) . toEqual ( [ 1 , 2 , 3 , 4 , 5 , 6 ] ) ;
60
- } ) ;
57
+ const plain = state . toJS ( ) ;
58
+ expect ( plain ) . not . toBeNull ( ) ;
59
+ expect ( plain ) . toEqual ( [ 1 , 2 , 3 , 4 , 5 , 6 ] ) ;
60
+ } ) ;
61
61
62
- it ( 'can compose Immutable::OrderedSet initial states' , ( ) => {
63
- const state = compose (
64
- Set . of ( 3 , 2 , 1 ) ,
65
- Set . of ( 4 , 6 , 5 ) ,
66
- Set . of ( ) ,
67
- ) ;
68
- expect ( Set . isSet ( state ) ) . toEqual ( true ) ;
62
+ it ( 'can compose Immutable::OrderedSet initial states' , ( ) => {
63
+ const state = compose (
64
+ Set . of ( 3 , 2 , 1 ) ,
65
+ Set . of ( 4 , 6 , 5 ) ,
66
+ Set . of ( ) ,
67
+ ) ;
68
+ expect ( Set . isSet ( state ) ) . toEqual ( true ) ;
69
69
70
- const plain = state . toJS ( ) ;
71
- expect ( plain ) . not . toBeNull ( ) ;
72
- expect ( plain ) . toEqual ( [ 3 , 2 , 1 , 4 , 6 , 5 ] ) ;
73
- } ) ;
70
+ const plain = state . toJS ( ) ;
71
+ expect ( plain ) . not . toBeNull ( ) ;
72
+ expect ( plain ) . toEqual ( [ 3 , 2 , 1 , 4 , 6 , 5 ] ) ;
73
+ } ) ;
74
74
75
- it ( 'can compose Immutable::List initial states' , ( ) => {
76
- const state = compose (
77
- List . of ( 'a' , 'b' ) ,
78
- List . of ( 'c' , 'd' ) ,
79
- List . of ( ) ,
80
- ) ;
81
- expect ( List . isList ( state ) ) . toEqual ( true ) ;
75
+ it ( 'can compose Immutable::List initial states' , ( ) => {
76
+ const state = compose (
77
+ List . of ( 'a' , 'b' ) ,
78
+ List . of ( 'c' , 'd' ) ,
79
+ List . of ( ) ,
80
+ ) ;
81
+ expect ( List . isList ( state ) ) . toEqual ( true ) ;
82
82
83
- const plain = state . toJS ( ) ;
84
- expect ( plain ) . not . toBeNull ( ) ;
85
- expect ( plain ) . toEqual ( [ 'a' , 'b' , 'c' , 'd' ] ) ;
86
- } ) ;
83
+ const plain = state . toJS ( ) ;
84
+ expect ( plain ) . not . toBeNull ( ) ;
85
+ expect ( plain ) . toEqual ( [ 'a' , 'b' , 'c' , 'd' ] ) ;
86
+ } ) ;
87
87
} ) ;
0 commit comments