Correcting tests regarding court prioritization
This commit is contained in:
parent
f0d4207880
commit
82ff838359
1 changed files with 7 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ describe('baanreserveren.service', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
pageGotoSpy = jest
|
pageGotoSpy = jest
|
||||||
.fn()
|
.fn()
|
||||||
|
.mockClear()
|
||||||
.mockImplementation(() => Promise.resolve({ status: () => 200 }))
|
.mockImplementation(() => Promise.resolve({ status: () => 200 }))
|
||||||
module = await Test.createTestingModule({
|
module = await Test.createTestingModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|
@ -54,10 +55,12 @@ describe('baanreserveren.service', () => {
|
||||||
brService = module.get<BaanReserverenService>(BaanReserverenService)
|
brService = module.get<BaanReserverenService>(BaanReserverenService)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
beforeEach(() => pageGotoSpy.mockClear())
|
||||||
|
|
||||||
describe('performSpeedyReservation', () => {
|
describe('performSpeedyReservation', () => {
|
||||||
it.each([
|
it.each([
|
||||||
[18, 15, CourtSlot.Seven, CourtSlot.Six],
|
[18, 15, CourtSlot.Six, CourtSlot.Seven],
|
||||||
[18, 30, CourtSlot.Four, CourtSlot.Two],
|
[18, 30, CourtSlot.One, CourtSlot.Four],
|
||||||
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
||||||
])(
|
])(
|
||||||
'should try highest ranked court first',
|
'should try highest ranked court first',
|
||||||
|
|
@ -89,8 +92,8 @@ describe('baanreserveren.service', () => {
|
||||||
)
|
)
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
[18, 15, CourtSlot.Seven, CourtSlot.Eight],
|
[18, 15, CourtSlot.Six, CourtSlot.Seven],
|
||||||
[18, 30, CourtSlot.Four, CourtSlot.Two],
|
[18, 30, CourtSlot.One, CourtSlot.Four],
|
||||||
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
[18, 45, CourtSlot.Twelve, CourtSlot.Thirteen],
|
||||||
])(
|
])(
|
||||||
'should try backup if first rank is taken',
|
'should try backup if first rank is taken',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue