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

   ### What changes were proposed in this PR?
   
   Add unit test coverage for `compileWorkflowAsync` in 
`agent-service/src/api/compile-api.ts` — a `fetch`-based client returning 
`WorkflowCompilationResponse | null`. A `bun test` `.spec.ts` that mocks the 
global `fetch`. No production-code changes.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6376.
   
   ### How was this PR tested?
   
   ```
   bun test src/api/compile-api.spec.ts
   ```
   
   3 pass. `bun run typecheck` and `bun run format:check` are clean. The spec 
mocks `globalThis.fetch` (`spyOn` + `mock.restore()` between cases) and covers: 
the `POST` request shape (`/api/compile`, method, `Content-Type`, and the 
serialized `{ operators, links, opsToReuseResult, opsToViewResult }` body); the 
ok path returning the parsed `WorkflowCompilationResponse`; and both `null` 
fallbacks — a non-ok response and a rejected `fetch`.
   
   ### 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