import { AppStateKey } from '../url_state' ; import { TABLE_INTERVAL_DEFAULT } from '../../components/controls/select_interval/select_interval' ; export const useUrlState = jest . fn ( ( accessor ) => { if ( accessor === '_g' ) { return [ { refreshInterval : { value : 0 , pause : true } } , jest . fn ( ) ] ; } } ) ; export const usePageUrlState = jest . fn ( ( pageKey ) => { let state ; switch ( pageKey ) { case 'timeseriesexplorer' : state = { } ; break ; case 'mlSelectInterval' : state = TABLE_INTERVAL_DEFAULT ; break ; } return [ state , jest . fn ( ) ] ; } ) ;