All files / ee/app/assets/javascripts/dependencies/store/modules/list getters.js

100% Statements 12/12
100% Branches 2/2
100% Functions 6/6
100% Lines 8/8

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      4x 22x   19x 18x 17x 4x 18x   7x  
import { getTimeago } from '~/lib/utils/datetime_utility';
import { REPORT_STATUS } from './constants';
 
export const generatedAtTimeAgo = ({ reportInfo: { generatedAt } }) =>
  generatedAt ? getTimeago().format(generatedAt) : '';
 
export const isJobNotSetUp = (state) => state.reportInfo.status === REPORT_STATUS.jobNotSetUp;
export const isJobFailed = (state) => state.reportInfo.status === REPORT_STATUS.jobFailed;
export const isIncomplete = (state) => state.reportInfo.status === REPORT_STATUS.incomplete;
export const hasNoDependencies = (state) =>
  state.reportInfo.status === REPORT_STATUS.noDependencies;
 
export const downloadEndpoint = ({ endpoint }) => endpoint;