@@ -68,97 +68,97 @@ test('Keeps custom props', () => {
6868test ( '#foundation.init gets called when the component mounts' , ( ) => {
6969 const wrapper = mount < LinearProgress > ( < LinearProgress /> ) ;
7070 const instance = wrapper . instance ( ) ;
71- instance . foundation . init = td . func ( ) ;
71+ instance . foundation . init = td . func < ( ) => void > ( ) ;
7272 instance . componentDidMount ( ) ;
7373 td . verify ( instance . foundation . init ( ) , { times : 1 } ) ;
7474} ) ;
7575
7676test ( '#foundation.setBuffer gets called when the component mounts' , ( ) => {
7777 const wrapper = mount < LinearProgress > ( < LinearProgress buffer = { 0.1 } /> ) ;
7878 const instance = wrapper . instance ( ) ;
79- instance . foundation . setBuffer = td . func ( ) ;
79+ instance . foundation . setBuffer = td . func < ( value : number ) => void > ( ) ;
8080 instance . componentDidMount ( ) ;
8181 td . verify ( instance . foundation . setBuffer ( 0.1 ) , { times : 1 } ) ;
8282} ) ;
8383
8484test ( '#foundation.setDeterminate gets called when the component mounts' , ( ) => {
8585 const wrapper = mount < LinearProgress > ( < LinearProgress indeterminate = { true } /> ) ;
8686 const instance = wrapper . instance ( ) ;
87- instance . foundation . setDeterminate = td . func ( ) ;
87+ instance . foundation . setDeterminate = td . func < ( isDeterminate : boolean ) => void > ( ) ;
8888 instance . componentDidMount ( ) ;
8989 td . verify ( instance . foundation . setDeterminate ( false ) , { times : 1 } ) ;
9090} ) ;
9191
9292test ( '#foundation.setProgress gets called when the component mounts' , ( ) => {
9393 const wrapper = mount < LinearProgress > ( < LinearProgress progress = { 0.1 } /> ) ;
9494 const instance = wrapper . instance ( ) ;
95- instance . foundation . setProgress = td . func ( ) ;
95+ instance . foundation . setProgress = td . func < ( value : number ) => null > ( ) ;
9696 instance . componentDidMount ( ) ;
9797 td . verify ( instance . foundation . setProgress ( 0.1 ) , { times : 1 } ) ;
9898} ) ;
9999
100100test ( '#foundation.setReverse gets called when the component mounts' , ( ) => {
101101 const wrapper = mount < LinearProgress > ( < LinearProgress reversed = { true } /> ) ;
102102 const instance = wrapper . instance ( ) ;
103- instance . foundation . setReverse = td . func ( ) ;
103+ instance . foundation . setReverse = td . func < ( isReversed : boolean ) => void > ( ) ;
104104 instance . componentDidMount ( ) ;
105105 td . verify ( instance . foundation . setReverse ( true ) , { times : 1 } ) ;
106106} ) ;
107107
108108test ( '#foundation.close gets called when the component mounts' , ( ) => {
109109 const wrapper = mount < LinearProgress > ( < LinearProgress closed /> ) ;
110110 const instance = wrapper . instance ( ) ;
111- instance . foundation . close = td . func ( ) ;
111+ instance . foundation . close = td . func < ( ) => void > ( ) ;
112112 instance . componentDidMount ( ) ;
113113 td . verify ( instance . foundation . close ( ) , { times : 1 } ) ;
114114} ) ;
115115
116116test ( '#foundation.setBuffer gets called when props.buffer updates' , ( ) => {
117117 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 > ( ) ;
119119 wrapper . setProps ( { buffer : 0.2 } ) ;
120120 td . verify ( wrapper . instance ( ) . foundation . setBuffer ( 0.2 ) , { times : 1 } ) ;
121121} ) ;
122122
123123test ( '#foundation.close gets called when props.closed updates' , ( ) => {
124124 const wrapper = mount < LinearProgress > ( < LinearProgress closed = { false } /> ) ;
125- wrapper . instance ( ) . foundation . close = td . func ( ) ;
125+ wrapper . instance ( ) . foundation . close = td . func < ( ) => void > ( ) ;
126126 wrapper . setProps ( { closed : true } ) ;
127127 td . verify ( wrapper . instance ( ) . foundation . close ( ) , { times : 1 } ) ;
128128} ) ;
129129
130130test ( '#foundation.open gets called when props.closed updates' , ( ) => {
131131 const wrapper = mount < LinearProgress > ( < LinearProgress closed = { true } /> ) ;
132- wrapper . instance ( ) . foundation . open = td . func ( ) ;
132+ wrapper . instance ( ) . foundation . open = td . func < ( ) => void > ( ) ;
133133 wrapper . setProps ( { closed : false } ) ;
134134 td . verify ( wrapper . instance ( ) . foundation . open ( ) , { times : 1 } ) ;
135135} ) ;
136136
137137test ( '#foundation.setDeterminate gets called when props.indeterminate updates' , ( ) => {
138138 const wrapper = mount < LinearProgress > ( < LinearProgress indeterminate = { false } /> ) ;
139- wrapper . instance ( ) . foundation . setDeterminate = td . func ( ) ;
139+ wrapper . instance ( ) . foundation . setDeterminate = td . func < ( isDeterminate : boolean ) => void > ( ) ;
140140 wrapper . setProps ( { indeterminate : true } ) ;
141141 td . verify ( wrapper . instance ( ) . foundation . setDeterminate ( false ) , { times : 1 } ) ;
142142} ) ;
143143
144144test ( '#foundation.setProgress gets called when props.progress updates' , ( ) => {
145145 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 > ( ) ;
147147 wrapper . setProps ( { progress : 0.2 } ) ;
148148 td . verify ( wrapper . instance ( ) . foundation . setProgress ( 0.2 ) , { times : 1 } ) ;
149149} ) ;
150150
151151test ( '#foundation.setReverse gets called when props.reversed updates' , ( ) => {
152152 const wrapper = mount < LinearProgress > ( < LinearProgress reversed = { false } /> ) ;
153- wrapper . instance ( ) . foundation . setReverse = td . func ( ) ;
153+ wrapper . instance ( ) . foundation . setReverse = td . func < ( isReversed : boolean ) => void > ( ) ;
154154 wrapper . setProps ( { reversed : true } ) ;
155155 td . verify ( wrapper . instance ( ) . foundation . setReverse ( true ) , { times : 1 } ) ;
156156} ) ;
157157
158158test ( '#foundation.destroy gets called when the component unmounts' , ( ) => {
159159 const wrapper = mount < LinearProgress > ( < LinearProgress /> ) ;
160160 const instance = wrapper . instance ( ) ;
161- instance . foundation . destroy = td . func ( ) ;
161+ instance . foundation . destroy = td . func < ( ) => void > ( ) ;
162162 wrapper . unmount ( ) ;
163163 td . verify ( instance . foundation . destroy ( ) , { times : 1 } ) ;
164164} ) ;
0 commit comments