feat: 支持任务监控系统
This commit is contained in:
@@ -53,15 +53,14 @@ describe('范思伯特福中福响应映射', () => {
|
||||
})
|
||||
vi.stubGlobal('fetch', fetchMock)
|
||||
|
||||
await fansiboteFuzhongAdapter.getAvailability(query, {
|
||||
courtId: query.courtId
|
||||
})
|
||||
await fansiboteFuzhongAdapter.getAvailability(query)
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledOnce()
|
||||
const request = fetchMock.mock.calls[0]?.[1] as RequestInit
|
||||
expect(request.headers).toEqual(expect.objectContaining({
|
||||
STOREID: '6038652'
|
||||
}))
|
||||
expect(request.headers).not.toHaveProperty('PSPLVISITORID')
|
||||
expect(JSON.parse(String(request.body))).toEqual({
|
||||
dateTime: '2026-07-16',
|
||||
userId: 6038652,
|
||||
@@ -283,6 +282,13 @@ describe('范思伯特福中福响应映射', () => {
|
||||
},
|
||||
expect.objectContaining({ id: '1784027073124705081' })
|
||||
])
|
||||
expect(result.slots.map(({ status, unavailableLabel }) => ({
|
||||
status,
|
||||
unavailableLabel
|
||||
}))).toEqual([
|
||||
{ status: 'booked', unavailableLabel: '已订' },
|
||||
{ status: 'booked', unavailableLabel: '已订' }
|
||||
])
|
||||
})
|
||||
|
||||
it('接口字段变化时明确失败,不静默丢时段', () => {
|
||||
|
||||
Reference in New Issue
Block a user