@@ -17,18 +17,18 @@ describe('paginated', () => {
1717 const items = [ { id : 'a' } , { id : 'b' } , { id : 'c' } ]
1818 const page = paginated ( { } , items )
1919 expect ( page . items ) . toEqual ( [ { id : 'a' } , { id : 'b' } , { id : 'c' } ] )
20- expect ( page . nextPage ) . toBeNull ( )
20+ expect ( page . next_page ) . toBeNull ( )
2121 } )
2222
2323 it ( 'should return the first 100 items with no limit passed' , ( ) => {
2424 const items = Array . from ( { length : 200 } ) . map ( ( _ , i ) => ( { id : 'i' + i } ) )
2525 const page = paginated ( { } , items )
2626 expect ( page . items . length ) . toBe ( 100 )
2727 expect ( page . items ) . toEqual ( items . slice ( 0 , 100 ) )
28- expect ( page . nextPage ) . toBe ( 'i100' )
28+ expect ( page . next_page ) . toBe ( 'i100' )
2929 } )
3030
31- it ( 'should return page with null `nextPage ` if items equal page' , ( ) => {
31+ it ( 'should return page with null `next_page ` if items equal page' , ( ) => {
3232 const items = [
3333 { id : 'a' } ,
3434 { id : 'b' } ,
@@ -44,7 +44,7 @@ describe('paginated', () => {
4444 const page = paginated ( { } , items )
4545 expect ( page . items . length ) . toBe ( 10 )
4646 expect ( page . items ) . toEqual ( items . slice ( 0 , 10 ) )
47- expect ( page . nextPage ) . toBeNull ( )
47+ expect ( page . next_page ) . toBeNull ( )
4848 } )
4949
5050 it ( 'should return 5 items with a limit of 5' , ( ) => {
@@ -59,15 +59,15 @@ describe('paginated', () => {
5959 const page = paginated ( { limit : 5 } , items )
6060 expect ( page . items . length ) . toBe ( 5 )
6161 expect ( page . items ) . toEqual ( items . slice ( 0 , 5 ) )
62- expect ( page . nextPage ) . toBe ( 'f' )
62+ expect ( page . next_page ) . toBe ( 'f' )
6363 } )
6464
6565 it ( 'should return the second page when given a `page_token`' , ( ) => {
6666 const items = [ { id : 'a' } , { id : 'b' } , { id : 'c' } , { id : 'd' } ]
6767 const page = paginated ( { pageToken : 'b' } , items )
6868 expect ( page . items . length ) . toBe ( 3 )
6969 expect ( page . items ) . toEqual ( [ { id : 'b' } , { id : 'c' } , { id : 'd' } ] )
70- expect ( page . nextPage ) . toBeNull ( )
70+ expect ( page . next_page ) . toBeNull ( )
7171 } )
7272} )
7373
0 commit comments