mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
adapt tests to 7e39a2f
This commit is contained in:
parent
7e39a2f333
commit
3b0740d310
2 changed files with 10 additions and 10 deletions
|
@ -65,7 +65,7 @@ const testEarlierLaterJourneys = async (cfg) => {
|
|||
})
|
||||
for (let j of earlier.journeys) {
|
||||
const firstLeg = j.legs[0]
|
||||
const dep = new Date(firstLeg.departure || firstLeg.formerScheduledDeparture)
|
||||
const dep = new Date(firstLeg.departure || firstLeg.scheduledDeparture)
|
||||
t.ok(dep < earliestDep)
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ const testEarlierLaterJourneys = async (cfg) => {
|
|||
})
|
||||
for (let j of later.journeys) {
|
||||
const firstLeg = j.legs[0]
|
||||
const dep = new Date(firstLeg.departure || firstLeg.formerScheduledDeparture)
|
||||
const dep = new Date(firstLeg.departure || firstLeg.scheduledDeparture)
|
||||
t.ok(dep > latestDep)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,20 +126,20 @@ const createValidateStopover = (cfg) => {
|
|||
a.strictEqual(typeof s.arrivalPlatform, 'string', msg + 'be a string')
|
||||
a.ok(s.arrivalPlatform, msg + 'not be empty')
|
||||
}
|
||||
if (is(s.formerScheduledArrivalPlatform)) {
|
||||
const msg = name + '.formerScheduledArrivalPlatform must '
|
||||
a.strictEqual(typeof s.formerScheduledArrivalPlatform, 'string', msg + 'be a string')
|
||||
a.ok(s.formerScheduledArrivalPlatform, msg + 'not be empty')
|
||||
if (is(s.scheduledArrivalPlatform)) {
|
||||
const msg = name + '.scheduledArrivalPlatform must '
|
||||
a.strictEqual(typeof s.scheduledArrivalPlatform, 'string', msg + 'be a string')
|
||||
a.ok(s.scheduledArrivalPlatform, msg + 'not be empty')
|
||||
}
|
||||
if (is(s.departurePlatform)) {
|
||||
const msg = name + '.departurePlatform must '
|
||||
a.strictEqual(typeof s.departurePlatform, 'string', msg + 'be a string')
|
||||
a.ok(s.departurePlatform, msg + 'not be empty')
|
||||
}
|
||||
if (is(s.formerScheduledDeparturePlatform)) {
|
||||
const msg = name + '.formerScheduledDeparturePlatform must '
|
||||
a.strictEqual(typeof s.formerScheduledDeparturePlatform, 'string', msg + 'be a string')
|
||||
a.ok(s.formerScheduledDeparturePlatform, msg + 'not be empty')
|
||||
if (is(s.scheduledDeparturePlatform)) {
|
||||
const msg = name + '.scheduledDeparturePlatform must '
|
||||
a.strictEqual(typeof s.scheduledDeparturePlatform, 'string', msg + 'be a string')
|
||||
a.ok(s.scheduledDeparturePlatform, msg + 'not be empty')
|
||||
}
|
||||
|
||||
anyOf(['stop', 'station'], val, s.stop, name + '.stop')
|
||||
|
|
Loading…
Add table
Reference in a new issue