Skip to content

Commit f6742c4

Browse files
chore(scorecard): fix validateThresholds error message (#2843)
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
1 parent 0266c3c commit f6742c4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

workspaces/scorecard/plugins/scorecard-node/src/utils/thresholds/validateThresholds.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ describe('validateThresholds', () => {
266266

267267
expect(() => validateThresholds(config, 'number')).toThrow(
268268
new ThresholdConfigFormatError(
269-
"Custom threshold key \"critical\" must specify a color or icon property. Only standard keys ('success', 'warning', 'error') have default colors and icons.",
269+
"Custom threshold key \"critical\" must specify a color and icon property. Only standard keys ('success', 'warning', 'error') have default colors and icons.",
270270
),
271271
);
272272
});
@@ -285,7 +285,7 @@ describe('validateThresholds', () => {
285285

286286
expect(() => validateThresholds(config, 'number')).toThrow(
287287
new ThresholdConfigFormatError(
288-
"Custom threshold key \"critical\" must specify a color or icon property. Only standard keys ('success', 'warning', 'error') have default colors and icons.",
288+
"Custom threshold key \"critical\" must specify a color and icon property. Only standard keys ('success', 'warning', 'error') have default colors and icons.",
289289
),
290290
);
291291
});

workspaces/scorecard/plugins/scorecard-node/src/utils/thresholds/validateThresholds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function validateThresholds(
152152
throw new ThresholdConfigFormatError(
153153
`Custom threshold key "${
154154
rule.key
155-
}" must specify a color or icon property. Only standard keys (${standardThresholdRuleKeys
155+
}" must specify a color and icon property. Only standard keys (${standardThresholdRuleKeys
156156
.map(k => `'${k}'`)
157157
.join(', ')}) have default colors and icons.`,
158158
);

0 commit comments

Comments
 (0)