TASK-CODE-20250419-190300.md•1.17 kB
# Task: Write Integration Test for Yeepay Payment Flow
**Status:** Pending
**Coordinator:** TASK-CMD-20250419-190107
**Assigned To:** code
**Acceptance Criteria:**
- An integration test file exists (e.g., `tests/integration.test.ts`).
- The test successfully calls `create_mobile_yeepay_payment` (mocked or configured).
- The test extracts `uniqueOrderNo` from the creation response.
- The test successfully calls `query_yeepay_payment_status` using the extracted `uniqueOrderNo` (mocked or configured).
- Basic assertions verify the flow.
**Context Files:**
- `src/tools/createPayment.ts`
- `src/tools/queryPayment.ts`
- `jest.config.js`
**Checklist:**
- [⏳] Create `tests` directory if it doesn't exist.
- [⏳] Create `tests/integration.test.ts` file.
- [⏳] Import necessary functions and Jest utilities.
- [⏳] Write `describe` and `it` blocks.
- [⏳] Implement the call to `create_mobile_yeepay_payment` (handle parameters, potentially mock).
- [⏳] Implement extraction of `uniqueOrderNo`.
- [⏳] Implement the call to `query_yeepay_payment_status` (potentially mock).
- [⏳] Add basic Jest assertions (`expect`).
- [📣] Report completion or issues.