All files / app/assets/javascripts/reports/accessibility_report/store state.js

100% Statements 1/1
100% Branches 9/9
100% Functions 1/1
100% Lines 1/1

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 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2933x                                                        
export default (initialState = {}) => ({
  endpoint: initialState.endpoint || '',
 
  isLoading: initialState.isLoading || false,
  hasError: initialState.hasError || false,
 
  /**
   * Report will have the following format:
   * {
   *   status: {String},
   *   summary: {
   *     total: {Number},
   *     resolved: {Number},
   *     errored: {Number},
   *   },
   *   existing_errors: {Array.<Object>},
   *   existing_notes: {Array.<Object>},
   *   existing_warnings: {Array.<Object>},
   *   new_errors: {Array.<Object>},
   *   new_notes: {Array.<Object>},
   *   new_warnings: {Array.<Object>},
   *   resolved_errors: {Array.<Object>},
   *   resolved_notes: {Array.<Object>},
   *   resolved_warnings: {Array.<Object>},
   * }
   */
  report: initialState.report || {},
});