@@ -37,29 +37,29 @@ describe('usePagination', () => {
3737 }
3838 } ) ;
3939
40- it ( 'should prevet previous when at start' , ( ) => {
40+ it ( 'should prevent previous when at start' , ( ) => {
4141 const { result } = renderHook ( ( ) =>
4242 usePagination ( { totalPages : 10 , currentPage : 1 } ) ,
4343 ) ;
4444
4545 expect ( result . current . hasPrev ) . toBe ( false ) ;
4646 expect ( result . current . hasNext ) . toBe ( true ) ;
47- expect ( result . current . prevButtonProps [ 'aria-disabled ' ] ) . toBe ( true ) ;
48- expect ( result . current . nextButtonProps [ 'aria-disabled ' ] ) . toBe ( false ) ;
47+ expect ( result . current . prevButtonProps [ 'aria-hidden ' ] ) . toBe ( true ) ;
48+ expect ( result . current . nextButtonProps [ 'aria-hidden ' ] ) . toBe ( false ) ;
4949 } ) ;
5050
51- it ( 'should prevet next when at end' , ( ) => {
51+ it ( 'should prevent next when at end' , ( ) => {
5252 const { result } = renderHook ( ( ) =>
5353 usePagination ( { totalPages : 10 , currentPage : 10 } ) ,
5454 ) ;
5555
5656 expect ( result . current . hasPrev ) . toBe ( true ) ;
5757 expect ( result . current . hasNext ) . toBe ( false ) ;
58- expect ( result . current . prevButtonProps [ 'aria-disabled ' ] ) . toBe ( false ) ;
59- expect ( result . current . nextButtonProps [ 'aria-disabled ' ] ) . toBe ( true ) ;
58+ expect ( result . current . prevButtonProps [ 'aria-hidden ' ] ) . toBe ( false ) ;
59+ expect ( result . current . nextButtonProps [ 'aria-hidden ' ] ) . toBe ( true ) ;
6060 } ) ;
6161
62- it ( 'should trigger onChange when clickinging button' , async ( ) => {
62+ it ( 'should trigger onChange when clicking button' , async ( ) => {
6363 const mockOnChange = vi . fn ( ) ;
6464 const event = { preventDefault : ( ) => { } } as MouseEvent < HTMLButtonElement > ;
6565 const { result } = renderHook ( ( ) =>
@@ -71,7 +71,7 @@ describe('usePagination', () => {
7171 expect ( mockOnChange ) . toHaveBeenCalledWith ( event , 2 ) ;
7272 } ) ;
7373
74- it ( 'should not trigger onChange when clickinging previous button and in start' , async ( ) => {
74+ it ( 'should not trigger onChange when clicking previous button and in start' , async ( ) => {
7575 const mockOnChange = vi . fn ( ) ;
7676 const event = { preventDefault : ( ) => { } } as MouseEvent < HTMLButtonElement > ;
7777 const { result } = renderHook ( ( ) =>
0 commit comments