@@ -68,97 +68,97 @@ test('Keeps custom props', () => {
68
68
test ( '#foundation.init gets called when the component mounts' , ( ) => {
69
69
const wrapper = mount < LinearProgress > ( < LinearProgress /> ) ;
70
70
const instance = wrapper . instance ( ) ;
71
- instance . foundation . init = td . func ( ) ;
71
+ instance . foundation . init = td . func < ( ) => void > ( ) ;
72
72
instance . componentDidMount ( ) ;
73
73
td . verify ( instance . foundation . init ( ) , { times : 1 } ) ;
74
74
} ) ;
75
75
76
76
test ( '#foundation.setBuffer gets called when the component mounts' , ( ) => {
77
77
const wrapper = mount < LinearProgress > ( < LinearProgress buffer = { 0.1 } /> ) ;
78
78
const instance = wrapper . instance ( ) ;
79
- instance . foundation . setBuffer = td . func ( ) ;
79
+ instance . foundation . setBuffer = td . func < ( value : number ) => void > ( ) ;
80
80
instance . componentDidMount ( ) ;
81
81
td . verify ( instance . foundation . setBuffer ( 0.1 ) , { times : 1 } ) ;
82
82
} ) ;
83
83
84
84
test ( '#foundation.setDeterminate gets called when the component mounts' , ( ) => {
85
85
const wrapper = mount < LinearProgress > ( < LinearProgress indeterminate = { true } /> ) ;
86
86
const instance = wrapper . instance ( ) ;
87
- instance . foundation . setDeterminate = td . func ( ) ;
87
+ instance . foundation . setDeterminate = td . func < ( isDeterminate : boolean ) => void > ( ) ;
88
88
instance . componentDidMount ( ) ;
89
89
td . verify ( instance . foundation . setDeterminate ( false ) , { times : 1 } ) ;
90
90
} ) ;
91
91
92
92
test ( '#foundation.setProgress gets called when the component mounts' , ( ) => {
93
93
const wrapper = mount < LinearProgress > ( < LinearProgress progress = { 0.1 } /> ) ;
94
94
const instance = wrapper . instance ( ) ;
95
- instance . foundation . setProgress = td . func ( ) ;
95
+ instance . foundation . setProgress = td . func < ( value : number ) => null > ( ) ;
96
96
instance . componentDidMount ( ) ;
97
97
td . verify ( instance . foundation . setProgress ( 0.1 ) , { times : 1 } ) ;
98
98
} ) ;
99
99
100
100
test ( '#foundation.setReverse gets called when the component mounts' , ( ) => {
101
101
const wrapper = mount < LinearProgress > ( < LinearProgress reversed = { true } /> ) ;
102
102
const instance = wrapper . instance ( ) ;
103
- instance . foundation . setReverse = td . func ( ) ;
103
+ instance . foundation . setReverse = td . func < ( isReversed : boolean ) => void > ( ) ;
104
104
instance . componentDidMount ( ) ;
105
105
td . verify ( instance . foundation . setReverse ( true ) , { times : 1 } ) ;
106
106
} ) ;
107
107
108
108
test ( '#foundation.close gets called when the component mounts' , ( ) => {
109
109
const wrapper = mount < LinearProgress > ( < LinearProgress closed /> ) ;
110
110
const instance = wrapper . instance ( ) ;
111
- instance . foundation . close = td . func ( ) ;
111
+ instance . foundation . close = td . func < ( ) => void > ( ) ;
112
112
instance . componentDidMount ( ) ;
113
113
td . verify ( instance . foundation . close ( ) , { times : 1 } ) ;
114
114
} ) ;
115
115
116
116
test ( '#foundation.setBuffer gets called when props.buffer updates' , ( ) => {
117
117
const wrapper = mount < LinearProgress > ( < LinearProgress buffer = { 0.1 } /> ) ;
118
- wrapper . instance ( ) . foundation . setBuffer = td . func ( ) ;
118
+ wrapper . instance ( ) . foundation . setBuffer = td . func < ( value : number ) => void > ( ) ;
119
119
wrapper . setProps ( { buffer : 0.2 } ) ;
120
120
td . verify ( wrapper . instance ( ) . foundation . setBuffer ( 0.2 ) , { times : 1 } ) ;
121
121
} ) ;
122
122
123
123
test ( '#foundation.close gets called when props.closed updates' , ( ) => {
124
124
const wrapper = mount < LinearProgress > ( < LinearProgress closed = { false } /> ) ;
125
- wrapper . instance ( ) . foundation . close = td . func ( ) ;
125
+ wrapper . instance ( ) . foundation . close = td . func < ( ) => void > ( ) ;
126
126
wrapper . setProps ( { closed : true } ) ;
127
127
td . verify ( wrapper . instance ( ) . foundation . close ( ) , { times : 1 } ) ;
128
128
} ) ;
129
129
130
130
test ( '#foundation.open gets called when props.closed updates' , ( ) => {
131
131
const wrapper = mount < LinearProgress > ( < LinearProgress closed = { true } /> ) ;
132
- wrapper . instance ( ) . foundation . open = td . func ( ) ;
132
+ wrapper . instance ( ) . foundation . open = td . func < ( ) => void > ( ) ;
133
133
wrapper . setProps ( { closed : false } ) ;
134
134
td . verify ( wrapper . instance ( ) . foundation . open ( ) , { times : 1 } ) ;
135
135
} ) ;
136
136
137
137
test ( '#foundation.setDeterminate gets called when props.indeterminate updates' , ( ) => {
138
138
const wrapper = mount < LinearProgress > ( < LinearProgress indeterminate = { false } /> ) ;
139
- wrapper . instance ( ) . foundation . setDeterminate = td . func ( ) ;
139
+ wrapper . instance ( ) . foundation . setDeterminate = td . func < ( isDeterminate : boolean ) => void > ( ) ;
140
140
wrapper . setProps ( { indeterminate : true } ) ;
141
141
td . verify ( wrapper . instance ( ) . foundation . setDeterminate ( false ) , { times : 1 } ) ;
142
142
} ) ;
143
143
144
144
test ( '#foundation.setProgress gets called when props.progress updates' , ( ) => {
145
145
const wrapper = mount < LinearProgress > ( < LinearProgress progress = { 0.1 } /> ) ;
146
- wrapper . instance ( ) . foundation . setProgress = td . func ( ) ;
146
+ wrapper . instance ( ) . foundation . setProgress = td . func < ( value : number ) => void > ( ) ;
147
147
wrapper . setProps ( { progress : 0.2 } ) ;
148
148
td . verify ( wrapper . instance ( ) . foundation . setProgress ( 0.2 ) , { times : 1 } ) ;
149
149
} ) ;
150
150
151
151
test ( '#foundation.setReverse gets called when props.reversed updates' , ( ) => {
152
152
const wrapper = mount < LinearProgress > ( < LinearProgress reversed = { false } /> ) ;
153
- wrapper . instance ( ) . foundation . setReverse = td . func ( ) ;
153
+ wrapper . instance ( ) . foundation . setReverse = td . func < ( isReversed : boolean ) => void > ( ) ;
154
154
wrapper . setProps ( { reversed : true } ) ;
155
155
td . verify ( wrapper . instance ( ) . foundation . setReverse ( true ) , { times : 1 } ) ;
156
156
} ) ;
157
157
158
158
test ( '#foundation.destroy gets called when the component unmounts' , ( ) => {
159
159
const wrapper = mount < LinearProgress > ( < LinearProgress /> ) ;
160
160
const instance = wrapper . instance ( ) ;
161
- instance . foundation . destroy = td . func ( ) ;
161
+ instance . foundation . destroy = td . func < ( ) => void > ( ) ;
162
162
wrapper . unmount ( ) ;
163
163
td . verify ( instance . foundation . destroy ( ) , { times : 1 } ) ;
164
164
} ) ;
0 commit comments