Skip to content

Commit

Permalink
Filter away expect_same expectations in the checks count
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster committed Nov 22, 2022
1 parent c01ca61 commit 2c5a8d7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions assets/js/components/ChecksResults/checksUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ export const getHealth = (checkResults, checkID, agentID) => {
({ agent_id }) => agent_id === agentID
);

const failedExpectationEvaluations =
agentCheckResult?.expectation_evaluations.filter(
(expectationEvaluation) => 'message' in expectationEvaluation
);
const failedExpectationEvaluations = agentCheckResult?.expectation_evaluations
.filter((expectationEvaluation) => 'message' in expectationEvaluation)
.filter(({ type }) => type !== 'expect');

return {
expectations: checkResult.expectation_results.length,
Expand Down

0 comments on commit 2c5a8d7

Please sign in to comment.