fix age assurance state checks
This commit is contained in:
@@ -760,7 +760,8 @@ export function AgeAssuranceServerDataProvider({
|
||||
const serverState = useServerStateQuery()
|
||||
const {state, metadata} = serverState.data || {}
|
||||
const {data, status} = useOtherRequiredDataQuery()
|
||||
const otherRequiredDataStatus = data === undefined ? status : 'success'
|
||||
const otherRequiredDataStatus: OtherRequiredDataStatus =
|
||||
data === undefined ? status : 'success'
|
||||
// `select` resolves the cached region-keyed map to the current region.
|
||||
const {data: deviceSignals} = useDeviceSignalsQuery()
|
||||
const ctx = useMemo(
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
import {computeAgeAssuranceState} from '#/ageAssurance/state'
|
||||
import {AgeAssuranceAccess, AgeAssuranceStatus} from '#/ageAssurance/types'
|
||||
|
||||
jest.mock('#/ageAssurance/data', () => ({}))
|
||||
jest.mock('#/ageAssurance/logger', () => ({
|
||||
logger: {
|
||||
debug: jest.fn(),
|
||||
warn: jest.fn(),
|
||||
},
|
||||
}))
|
||||
jest.mock('#/state/session', () => ({}))
|
||||
|
||||
const geolocation = {
|
||||
countryCode: undefined,
|
||||
regionCode: undefined,
|
||||
|
||||
Reference in New Issue
Block a user