@@ -2,11 +2,10 @@ import React from 'react';
22import { render , screen } from '@testing-library/react' ;
33import '@testing-library/jest-dom' ;
44import { useSelector } from 'react-redux' ;
5- import { RewardsPointsBalance } from './RewardsPointsBalance' ;
65import { useI18nContext } from '../../../hooks/useI18nContext' ;
76import { useRewardsContext } from '../../../contexts/rewards' ;
87import type { RewardsContextValue } from '../../../contexts/rewards' ;
9- import type { SeasonStatusState } from '../../../../app/scripts/controllers/rewards/rewards-controller.types ' ;
8+ import { RewardsPointsBalance } from './RewardsPointsBalance ' ;
109
1110// Mock dependencies
1211jest . mock ( 'react-redux' , ( ) => ( {
@@ -39,14 +38,20 @@ const mockUseRewardsContext = useRewardsContext as jest.MockedFunction<
3938
4039describe ( 'RewardsPointsBalance' , ( ) => {
4140 const mockT = jest . fn ( ( key : string , values ?: string [ ] ) => {
42- if ( key === 'rewardsOptIn' ) return 'Opt In' ;
43- if ( key === 'rewardsPointsBalance' && values ) return `${ values [ 0 ] } points` ;
44- if ( key === 'rewardsPointsIcon' ) return 'Rewards Points Icon' ;
41+ if ( key === 'rewardsOptIn' ) {
42+ return 'Opt In' ;
43+ }
44+ if ( key === 'rewardsPointsBalance' && values ) {
45+ return `${ values [ 0 ] } points` ;
46+ }
47+ if ( key === 'rewardsPointsIcon' ) {
48+ return 'Rewards Points Icon' ;
49+ }
4550 return key ;
4651 } ) ;
4752
4853 // Mock season status with complete structure
49- const mockSeasonStatus : SeasonStatusState = {
54+ const mockSeasonStatus = {
5055 season : {
5156 id : 'test-season' ,
5257 name : 'Test Season' ,
0 commit comments