(url: string)
| 728 | }) { |
| 729 | const counts = { type: 0, result: 0, run: 0 }; |
| 730 | const handler = (url: string) => { |
| 731 | if (url.includes('/tests/test_xyz/result')) { |
| 732 | counts.result += 1; |
| 733 | return { body: args.result() }; |
| 734 | } |
| 735 | if (url.includes('/tests/test_xyz')) { |
| 736 | counts.type += 1; |
| 737 | return { |
| 738 | body: { |
| 739 | id: 'test_xyz', |
| 740 | projectId: 'p1', |
| 741 | name: 'BE test', |
| 742 | type: args.type ?? 'backend', |
| 743 | createdFrom: 'mcp', |
| 744 | status: 'running', |
| 745 | createdAt: '2026-05-15T10:00:00.000Z', |
| 746 | updatedAt: '2026-05-15T10:00:00.000Z', |
| 747 | }, |
| 748 | }; |
| 749 | } |
| 750 | counts.run += 1; |
| 751 | const rs = |
| 752 | typeof args.runStatus === 'function' ? args.runStatus() : (args.runStatus ?? 'running'); |
| 753 | return { body: makeRun(rs) }; |
| 754 | }; |
| 755 | return { handler, counts }; |
| 756 | } |
| 757 |
no test coverage detected