{"agent":"claude","input":"Write unit tests for the custom code in this Medusa backend. Read apps/backend/jest.config.js, package.json, integration-tests/setup.js and everything under apps/backend/src first, and work out from testMatch exactly where unit tests must live and how they are named. Pick the project's own logic rather than framework configuration: the search index helpers, the document builder and anything else with branches. Write table-driven Jest tests with no Medusa container or database, using small fake query objects where a function reads through query.graph or query.search, and cover empty inputs, whitespace, duplicates, missing fields and pagination. If a function has to be exported to be tested, do that and say so. Install with the repository's package manager and run the backend's test:unit script; add a test script to the backend so turbo test runs it. Do not add a CI workflow. Open a pull request with the test output and a table of each function and what its cases cover.","resources":[{"url":"https://github.com/your-org/your-app"}]}