mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
integration tests: define mocked when per profile ✅
https://github.com/public-transport/hafas-client/pull/264#issuecomment-1107462890
This commit is contained in:
parent
68ecd7c5e9
commit
1ab526d900
36 changed files with 85 additions and 40 deletions
|
@ -8,7 +8,8 @@ const blsProfile = require('../../p/bls')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
||||||
|
|
||||||
const when = createWhen(blsProfile.timezone, blsProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(blsProfile.timezone, blsProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -22,7 +22,8 @@ const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product
|
||||||
const testDepartures = require('./lib/departures')
|
const testDepartures = require('./lib/departures')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(cflProfile.timezone, cflProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -18,7 +18,8 @@ const testArrivals = require('./lib/arrivals')
|
||||||
const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(cmtaProfile.timezone, cmtaProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(cmtaProfile.timezone, cmtaProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const dartProfile = require('../../p/dart')
|
const dartProfile = require('../../p/dart')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(dartProfile.timezone, dartProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(dartProfile.timezone, dartProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -12,7 +12,8 @@ const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(dbBusradarNrwProfile.timezone, dbBusradarNrwProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -31,7 +31,8 @@ const testServerInfo = require('./lib/server-info')
|
||||||
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
||||||
const minute = 60 * 1000
|
const minute = 60 * 1000
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(dbProfile.timezone, dbProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -17,7 +17,8 @@ const testDepartures = require('./lib/departures')
|
||||||
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(hvvProfile.timezone, hvvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -24,7 +24,8 @@ const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||||
|
|
||||||
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(insaProfile.timezone, insaProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -20,7 +20,9 @@ const testRefreshJourney = require('./lib/refresh-journey')
|
||||||
const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product')
|
const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(invgProfile.timezone, invgProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {when, products}
|
const cfg = {when, products}
|
||||||
|
|
||||||
const _validateJourneyLeg = createValidateJourneyLeg(cfg)
|
const _validateJourneyLeg = createValidateJourneyLeg(cfg)
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const ivbProfile = require('../../p/ivb')
|
const ivbProfile = require('../../p/ivb')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(ivbProfile.timezone, ivbProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(ivbProfile.timezone, ivbProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const kvbProfile = require('../../p/kvb')
|
const kvbProfile = require('../../p/kvb')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(kvbProfile.timezone, kvbProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(kvbProfile.timezone, kvbProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const isRoughlyEqual = require('is-roughly-equal')
|
const isRoughlyEqual = require('is-roughly-equal')
|
||||||
const {AssertionError} = require('assert')
|
const {ok, AssertionError} = require('assert')
|
||||||
const {DateTime} = require('luxon')
|
const {DateTime} = require('luxon')
|
||||||
const a = require('assert')
|
const a = require('assert')
|
||||||
const {join} = require('path')
|
const {join} = require('path')
|
||||||
|
@ -10,12 +10,12 @@ const hour = 60 * 60 * 1000
|
||||||
const day = 24 * hour
|
const day = 24 * hour
|
||||||
const week = 7 * day
|
const week = 7 * day
|
||||||
|
|
||||||
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
|
||||||
|
|
||||||
// next Monday 10 am
|
// next Monday 10 am
|
||||||
const createWhen = (timezone, locale) => {
|
const createWhen = (timezone, locale, tMock) => {
|
||||||
|
ok(Number.isInteger(tMock), 'tMock must be an integer')
|
||||||
|
|
||||||
const t = process.env.VCR_MODE && !process.env.VCR_OFF
|
const t = process.env.VCR_MODE && !process.env.VCR_OFF
|
||||||
? T_MOCK
|
? tMock
|
||||||
: Date.now()
|
: Date.now()
|
||||||
return DateTime.fromMillis(t, {
|
return DateTime.fromMillis(t, {
|
||||||
zone: timezone,
|
zone: timezone,
|
||||||
|
|
|
@ -12,7 +12,8 @@ const {
|
||||||
movement: createValidateMovement
|
movement: createValidateMovement
|
||||||
} = require('./validators')
|
} = require('./validators')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen('Europe/Berlin', 'de-DE', T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -16,7 +16,8 @@ const testDepartures = require('./lib/departures')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(mobilNrwProfile.timezone, mobilNrwProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(mobilNrwProfile.timezone, mobilNrwProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -22,7 +22,8 @@ const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product
|
||||||
const testDepartures = require('./lib/departures')
|
const testDepartures = require('./lib/departures')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(mobiliteitLuProfile.timezone, mobiliteitLuProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -23,7 +23,8 @@ const testDeparturesInDirection = require('./lib/departures-in-direction')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(nahshProfile.timezone, nahshProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -20,7 +20,9 @@ const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||||
|
|
||||||
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(nvvProfile.timezone, nvvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -22,7 +22,8 @@ const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product
|
||||||
const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||||
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
||||||
|
|
||||||
const when = createWhen('Europe/Vienna', 'de-AT')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(oebbProfile.timezone, oebbProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const oövvProfile = require('../../p/ooevv')
|
const oövvProfile = require('../../p/ooevv')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(oövvProfile.timezone, oövvProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(oövvProfile.timezone, oövvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -16,7 +16,8 @@ const testJourneysStationToStation = require('./lib/journeys-station-to-station'
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(pkpProfile.timezone, pkpProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(pkpProfile.timezone, pkpProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -15,7 +15,8 @@ const testEarlierLaterJourneys = require('./lib/earlier-later-journeys')
|
||||||
const testDepartures = require('./lib/departures')
|
const testDepartures = require('./lib/departures')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(rejseplanenProfile.timezone, rejseplanenProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const validate = createValidate({
|
const validate = createValidate({
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -12,7 +12,8 @@ const testRefreshJourney = require('./lib/refresh-journey')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(rmvProfile.timezone, rmvProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(rmvProfile.timezone, rmvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -13,7 +13,8 @@ const testRefreshJourney = require('./lib/refresh-journey')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(rsagProfile.timezone, rsagProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(rsagProfile.timezone, rsagProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -22,7 +22,8 @@ const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||||
const testDepartures = require('./lib/departures')
|
const testDepartures = require('./lib/departures')
|
||||||
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(saarfahrplanProfile.timezone, saarfahrplanProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const salzburgProfile = require('../../p/salzburg')
|
const salzburgProfile = require('../../p/salzburg')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(salzburgProfile.timezone, salzburgProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(salzburgProfile.timezone, salzburgProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -19,7 +19,8 @@ const testArrivals = require('./lib/arrivals')
|
||||||
const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(sMunichProfile.timezone, sMunichProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(sMunichProfile.timezone, sMunichProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -12,7 +12,8 @@ const testRefreshJourney = require('./lib/refresh-journey')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(sncbProfile.timezone, sncbProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(sncbProfile.timezone, sncbProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const stvProfile = require('../../p/stv')
|
const stvProfile = require('../../p/stv')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(stvProfile.timezone, stvProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(stvProfile.timezone, stvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -13,7 +13,8 @@ const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
const testServerInfo = require('./lib/server-info')
|
const testServerInfo = require('./lib/server-info')
|
||||||
|
|
||||||
const when = createWhen(svvProfile.timezone, svvProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(svvProfile.timezone, svvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -8,7 +8,8 @@ const tpgProfile = require('../../p/tpg')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
||||||
|
|
||||||
const when = createWhen(tpgProfile.timezone, tpgProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(tpgProfile.timezone, tpgProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -11,7 +11,8 @@ const testJourneysStationToStation = require('./lib/journeys-station-to-station'
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
const testReachableFrom = require('./lib/reachable-from')
|
const testReachableFrom = require('./lib/reachable-from')
|
||||||
|
|
||||||
const when = createWhen(vbnProfile.timezone, vbnProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(vbnProfile.timezone, vbnProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const vorProfile = require('../../p/vor')
|
const vorProfile = require('../../p/vor')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(vorProfile.timezone, vorProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(vorProfile.timezone, vorProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -17,7 +17,8 @@ const testDepartures = require('./lib/departures')
|
||||||
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(vrnProfile.timezone, vrnProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -15,7 +15,8 @@ const testEarlierLaterJourneys = require('./lib/earlier-later-journeys')
|
||||||
const testDepartures = require('./lib/departures')
|
const testDepartures = require('./lib/departures')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Berlin', 'de-DE')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(vsnProfile.timezone, vsnProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
|
|
|
@ -7,7 +7,9 @@ const createClient = require('../..')
|
||||||
const vvvProfile = require('../../p/vvv')
|
const vvvProfile = require('../../p/vvv')
|
||||||
const createValidate = require('./lib/validate-fptf-with')
|
const createValidate = require('./lib/validate-fptf-with')
|
||||||
|
|
||||||
const when = createWhen(vvvProfile.timezone, vvvProfile.locale)
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(vvvProfile.timezone, vvvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
when,
|
when,
|
||||||
stationCoordsOptional: false,
|
stationCoordsOptional: false,
|
||||||
|
|
|
@ -17,7 +17,8 @@ const testDepartures = require('./lib/departures')
|
||||||
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
const testDeparturesInDirection = require('./lib/departures-in-direction')
|
||||||
const testArrivals = require('./lib/arrivals')
|
const testArrivals = require('./lib/arrivals')
|
||||||
|
|
||||||
const when = createWhen('Europe/Zurich', 'de-CH')
|
const T_MOCK = 1641897000 * 1000 // 2022-01-11T11:30:00+01
|
||||||
|
const when = createWhen(zvvProfile.timezone, zvvProfile.locale, T_MOCK)
|
||||||
|
|
||||||
const validate = createValidate({
|
const validate = createValidate({
|
||||||
when,
|
when,
|
||||||
|
|
Loading…
Add table
Reference in a new issue