@@ -21,22 +21,22 @@ jest.mock('react-redux', () => ({
2121describe ( 'useMusdConversionEligibility' , ( ) => {
2222 beforeEach ( ( ) => {
2323 jest . clearAllMocks ( ) ;
24- mockGetDetectedGeolocation . mockReturnValue ( null ) ;
24+ mockGetDetectedGeolocation . mockReturnValue ( undefined ) ;
2525 mockSelectMusdConversionBlockedCountries . mockReturnValue ( [ ] ) ;
2626 } ) ;
2727
2828 describe ( 'isEligible' , ( ) => {
29- it ( 'returns false when geolocation is null (blocks by default for compliance)' , ( ) => {
30- mockGetDetectedGeolocation . mockReturnValue ( null ) ;
29+ it ( 'returns false when geolocation is undefined (blocks by default for compliance)' , ( ) => {
30+ mockGetDetectedGeolocation . mockReturnValue ( undefined ) ;
3131 mockSelectMusdConversionBlockedCountries . mockReturnValue ( [ 'GB' ] ) ;
3232
3333 const { result } = renderHook ( ( ) => useMusdConversionEligibility ( ) ) ;
3434
3535 expect ( result . current . isEligible ) . toBe ( false ) ;
3636 } ) ;
3737
38- it ( 'returns false when geolocation is null even with empty blocked list' , ( ) => {
39- mockGetDetectedGeolocation . mockReturnValue ( null ) ;
38+ it ( 'returns false when geolocation is undefined even with empty blocked list' , ( ) => {
39+ mockGetDetectedGeolocation . mockReturnValue ( undefined ) ;
4040 mockSelectMusdConversionBlockedCountries . mockReturnValue ( [ ] ) ;
4141
4242 const { result } = renderHook ( ( ) => useMusdConversionEligibility ( ) ) ;
@@ -132,8 +132,8 @@ describe('useMusdConversionEligibility', () => {
132132 } ) ;
133133
134134 describe ( 'isLoading' , ( ) => {
135- it ( 'returns true when geolocation is null ' , ( ) => {
136- mockGetDetectedGeolocation . mockReturnValue ( null ) ;
135+ it ( 'returns true when geolocation is undefined ' , ( ) => {
136+ mockGetDetectedGeolocation . mockReturnValue ( undefined ) ;
137137 mockSelectMusdConversionBlockedCountries . mockReturnValue ( [ ] ) ;
138138
139139 const { result } = renderHook ( ( ) => useMusdConversionEligibility ( ) ) ;
0 commit comments