mengw15 opened a new issue, #6335:
URL: https://github.com/apache/texera/issues/6335
### Task Summary
`agent-service/src/agent/util/workflow-system-metadata.ts` (codecov ~36.5%)
has two pure string formatters worth covering: `formatValidationErrors` and
`formatCompactSchemaForError`. (The file's `fetchOperatorMetadata` hits the
backend and is out of scope for this unit issue.) `agent-service` uses `bun
test`.
### Behavior to cover
- `formatValidationErrors({ isValid: true })` -> `""`
- `formatValidationErrors({ isValid: false, messages: { a: "x", b: "y" } })`
-> `"a: x; b: y"` (entries joined by `"; "`)
- `formatCompactSchemaForError({ required: ["a", "b"], properties: { a:
{...} } })` -> `"required: [a, b], properties: {...}"`, where `properties`
includes only the required keys present, JSON-stringified
- `formatCompactSchemaForError({ required: [], properties: {} })` ->
`"required: [], properties: {}"`
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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]