Fixing a unit test in performSpeedyReservation
This commit is contained in:
parent
c5978a8289
commit
63114e7736
1 changed files with 8 additions and 2 deletions
|
|
@ -61,13 +61,16 @@ describe('baanreserveren.service', () => {
|
|||
|
||||
describe('performSpeedyReservation', () => {
|
||||
it.each([
|
||||
[18, 15, CourtSlot.Six, CourtSlot.Seven],
|
||||
[18, 15, CourtSlot.Seven, CourtSlot.Six],
|
||||
[18, 30, CourtSlot.One, CourtSlot.Four],
|
||||
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
||||
])(
|
||||
'should try highest ranked court first',
|
||||
async (startHour, startMinute, preferredCourt, backupCourt) => {
|
||||
const start = dayjs()
|
||||
.set('year', 2026)
|
||||
.set('month', 7)
|
||||
.set('date', 27)
|
||||
.set('hour', startHour)
|
||||
.set('minute', startMinute)
|
||||
.set('second', 0)
|
||||
|
|
@ -94,7 +97,7 @@ describe('baanreserveren.service', () => {
|
|||
)
|
||||
|
||||
it.each([
|
||||
[18, 15, CourtSlot.Six, CourtSlot.Seven],
|
||||
[18, 15, CourtSlot.Seven, CourtSlot.Eight],
|
||||
[18, 30, CourtSlot.One, CourtSlot.Four],
|
||||
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
||||
])(
|
||||
|
|
@ -112,6 +115,9 @@ describe('baanreserveren.service', () => {
|
|||
return Promise.resolve({ status: () => 200 })
|
||||
})
|
||||
const start = dayjs()
|
||||
.set('year', 2026)
|
||||
.set('month', 7)
|
||||
.set('date', 27)
|
||||
.set('hour', startHour)
|
||||
.set('minute', startMinute)
|
||||
.set('second', 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue