From 2d139c8235a653006b0d49fe5668c21503e9a0fa Mon Sep 17 00:00:00 2001 From: Jannis R Date: Tue, 18 Aug 2020 02:13:33 +0200 Subject: [PATCH] =?UTF-8?q?improve=20E2E/integration=20test=20output=20?= =?UTF-8?q?=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/e2e/lib/departures-in-direction.js | 2 +- test/e2e/lib/validators.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/e2e/lib/departures-in-direction.js b/test/e2e/lib/departures-in-direction.js index 495b06eb..4061a086 100644 --- a/test/e2e/lib/departures-in-direction.js +++ b/test/e2e/lib/departures-in-direction.js @@ -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('/')}`) } } diff --git a/test/e2e/lib/validators.js b/test/e2e/lib/validators.js index 7078ae3a..b4f5c4cc 100644 --- a/test/e2e/lib/validators.js +++ b/test/e2e/lib/validators.js @@ -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')