mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
improve E2E/integration test output ✅
This commit is contained in:
parent
25fb25c18d
commit
2d139c8235
2 changed files with 6 additions and 5 deletions
|
@ -29,7 +29,7 @@ const testDeparturesInDirection = async (cfg) => {
|
|||
t.ok(trip.stopovers.some(st => (
|
||||
st.stop.station && directionIds.includes(st.stop.station.id) ||
|
||||
directionIds.includes(st.stop.id)
|
||||
)), `trip ${dep.tripId} of ${name} has no stopover at ${directionIds}`)
|
||||
)), `trip ${dep.tripId} of ${name} has no stopover at ${directionIds.join('/')}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -447,17 +447,18 @@ const createValidateMovement = (cfg) => {
|
|||
|
||||
const lName = name + '.location'
|
||||
val.location(val, m.location, lName)
|
||||
const s = `${m.location.latitude}|${m.location.longitude} ${m.line && m.line.name}`
|
||||
if ('number' === typeof maxLatitude) {
|
||||
a.ok(m.location.latitude <= maxLatitude, lName + '.latitude is too large')
|
||||
a.ok(m.location.latitude <= maxLatitude, lName + '.latitude is too large: ' + s)
|
||||
}
|
||||
if ('number' === typeof minLatitude) {
|
||||
a.ok(m.location.latitude >= minLatitude, lName + '.latitude is too small')
|
||||
a.ok(m.location.latitude >= minLatitude, lName + '.latitude is too small: ' + s)
|
||||
}
|
||||
if ('number' === typeof maxLongitude) {
|
||||
a.ok(m.location.longitude <= maxLongitude, lName + '.longitude is too large')
|
||||
a.ok(m.location.longitude <= maxLongitude, lName + '.longitude is too large: ' + s)
|
||||
}
|
||||
if ('number' === typeof minLongitude) {
|
||||
a.ok(m.location.longitude >= minLongitude, lName + '.longitude is too small')
|
||||
a.ok(m.location.longitude >= minLongitude, lName + '.longitude is too small: ' + s)
|
||||
}
|
||||
|
||||
a.ok(Array.isArray(m.nextStopovers), name + '.nextStopovers must be an array')
|
||||
|
|
Loading…
Add table
Reference in a new issue