All files / ee/app/assets/javascripts/geo_settings/store state.js

100% Statements 3/3
100% Branches 0/0
100% Functions 3/3
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12    41x           82x 82x    
import { DEFAULT_TIMEOUT, DEFAULT_ALLOWED_IP, FORM_VALIDATION_FIELDS } from '../constants';
 
export default (sitesPath) => ({
  sitesPath,
  isLoading: false,
  timeout: DEFAULT_TIMEOUT,
  allowedIp: DEFAULT_ALLOWED_IP,
  formErrors: Object.keys(FORM_VALIDATION_FIELDS)
    .map((key) => FORM_VALIDATION_FIELDS[key])
    .reduce((acc, cur) => ({ ...acc, [cur]: '' }), {}),
});