mengw15 opened a new pull request, #6601:
URL: https://github.com/apache/texera/pull/6601

   ### What changes were proposed in this PR?
   
   Adds a spec for the ten pure validation-message formatters exported by
   `frontend/src/app/common/formly/formly-config.ts` (previously ~62% coverage,
   none of them tested). They are plain `(err, field) => string` functions, so 
the
   spec needs no TestBed.
   
   11 tests cover:
   
   - `minItemsValidationMessage` / `maxItemsValidationMessage` / 
`minlengthValidationMessage` / `maxlengthValidationMessage` / 
`minValidationMessage` / `maxValidationMessage` / `multipleOfValidationMessage` 
/ `exclusiveMinimumValidationMessage` / `exclusiveMaximumValidationMessage` / 
`constValidationMessage` — each asserts the exact string produced from a sample 
`field.props`.
   - One case where the referenced `field.props` value is absent, so the 
optional-chaining branch (`field.props?.<x>` → `undefined` interpolated) is 
covered.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6591
   
   ### How was this PR tested?
   
   New unit tests, run locally in `frontend/` (all green; the failure path was
   verified by deliberately breaking an assertion to confirm the suite goes 
red):
   
   ```
   ng test --watch=false --include src/app/common/formly/formly-config.spec.ts
   # Test Files 1 passed (1) | Tests 11 passed (11)
   prettier --write <spec>   # unchanged
   eslint  <spec>            # clean
   ```
   
   The formatters are pure functions, so the suite is fully deterministic.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to