File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe('AutoPaginatable', () => {
6464 const resultPromise = paginatable . autoPagination ( ) ;
6565
6666 // Fast-forward through setTimeout calls
67- jest . advanceTimersByTimeAsync ( 250 ) ;
67+ await jest . advanceTimersByTimeAsync ( 350 ) ;
6868
6969 const result = await resultPromise ;
7070
@@ -114,10 +114,10 @@ describe('AutoPaginatable', () => {
114114
115115 const resultPromise = paginatable . autoPagination ( ) ;
116116
117- jest . advanceTimersByTimeAsync ( 250 ) ;
117+ await jest . advanceTimersByTimeAsync ( 700 ) ; // 350ms * 2 for two pages
118118 await resultPromise ;
119119
120- expect ( setTimeoutSpy ) . toHaveBeenCalledWith ( expect . any ( Function ) , 250 ) ;
120+ expect ( setTimeoutSpy ) . toHaveBeenCalledWith ( expect . any ( Function ) , 350 ) ;
121121 } ) ;
122122
123123 it ( 'passes through additional options to API calls' , async ( ) => {
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export class Organizations {
113113
114114 async listOrganizationFeatureFlags (
115115 options : ListOrganizationFeatureFlagsOptions ,
116- ) : Promise < AutoPaginatable < FeatureFlag > > {
116+ ) : Promise < AutoPaginatable < FeatureFlag , ListOrganizationFeatureFlagsOptions > > {
117117 const { organizationId, ...paginationOptions } = options ;
118118
119119 return new AutoPaginatable (
@@ -130,7 +130,7 @@ export class Organizations {
130130 deserializeFeatureFlag ,
131131 params ,
132132 ) ,
133- paginationOptions ,
133+ options ,
134134 ) ;
135135 }
136136}
You can’t perform that action at this time.
0 commit comments