Task Summary
formly-config.ts (frontend/src/app/common/formly/formly-config.ts, codecov ~62%) exports ten pure validation-message formatters used by the Texera formly config, none of which are tested. They are plain functions — no TestBed. Add a spec.
Behavior to add
Each formatter takes (err, field) and returns a message string derived from field.props?.<limit>. For each, pass a sample field (e.g. { props: { minItems: 3 } }) and assert the exact returned string:
minItemsValidationMessage / maxItemsValidationMessage
minlengthValidationMessage / maxlengthValidationMessage
minValidationMessage / maxValidationMessage
exclusiveMinimumValidationMessage / exclusiveMaximumValidationMessage
multipleOfValidationMessage
constValidationMessage
Include a case where the referenced field.props value is absent (the message still renders, with undefined interpolated) so the optional-chaining branch is covered.
Task Type
Task Summary
formly-config.ts(frontend/src/app/common/formly/formly-config.ts, codecov ~62%) exports ten pure validation-message formatters used by the Texera formly config, none of which are tested. They are plain functions — no TestBed. Add a spec.Behavior to add
Each formatter takes
(err, field)and returns a message string derived fromfield.props?.<limit>. For each, pass a samplefield(e.g.{ props: { minItems: 3 } }) and assert the exact returned string:minItemsValidationMessage/maxItemsValidationMessageminlengthValidationMessage/maxlengthValidationMessageminValidationMessage/maxValidationMessageexclusiveMinimumValidationMessage/exclusiveMaximumValidationMessagemultipleOfValidationMessageconstValidationMessageInclude a case where the referenced
field.propsvalue is absent (the message still renders, withundefinedinterpolated) so the optional-chaining branch is covered.Task Type