From a624e621727b8799fa719e9a0c1e366756a33a24 Mon Sep 17 00:00:00 2001 From: Traines Date: Fri, 10 Jan 2025 18:52:16 +0000 Subject: [PATCH] disable enrichStations for tests --- p/db/example.js | 2 +- test/db-arrivals.js | 2 +- test/db-departures.js | 2 +- test/db-journey.js | 2 +- test/db-refresh-journey.js | 2 +- test/dbnav-departures.js | 2 +- test/dbnav-refresh-journey.js | 2 +- test/dbnav-stop.js | 2 +- test/e2e/common.js | 2 +- test/e2e/db.js | 2 +- test/e2e/dbnav.js | 2 +- test/format/db-journeys-query.js | 2 +- test/format/dbnav-journeys-query.js | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/p/db/example.js b/p/db/example.js index 358f8c51..2bdf0e6a 100644 --- a/p/db/example.js +++ b/p/db/example.js @@ -3,7 +3,7 @@ import {createClient} from '../../index.js' import {profile as dbProfile} from './index.js' // Pick a descriptive user agent! hafas-client won't work with this string. -const client = createClient(dbProfile, 'hafas-client-example') +const client = createClient(dbProfile, 'hafas-client-example', {enrichStations: true}) const berlinJungfernheide = '8011167' const münchenHbf = '8000261' diff --git a/test/db-arrivals.js b/test/db-arrivals.js index 69d1d57e..56212ba5 100644 --- a/test/db-arrivals.js +++ b/test/db-arrivals.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/db/index.js'; const res = require('./fixtures/db-arrivals.json'); import {dbArrivals as expected} from './fixtures/db-arrivals.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/db-departures.js b/test/db-departures.js index e2d89414..e4b00b79 100644 --- a/test/db-departures.js +++ b/test/db-departures.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/db/index.js'; const res = require('./fixtures/db-departures-regio-guide.json'); import {dbDepartures as expected} from './fixtures/db-departures-regio-guide.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/db-journey.js b/test/db-journey.js index b457bcbf..64e3585b 100644 --- a/test/db-journey.js +++ b/test/db-journey.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/db/index.js'; const res = require('./fixtures/db-journey.json'); import {dbJourney as expected} from './fixtures/db-journey.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/db-refresh-journey.js b/test/db-refresh-journey.js index 99ae1a57..c3520990 100644 --- a/test/db-refresh-journey.js +++ b/test/db-refresh-journey.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/db/index.js'; const res = require('./fixtures/db-refresh-journey.json'); import {dbJourney as expected} from './fixtures/db-refresh-journey.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/dbnav-departures.js b/test/dbnav-departures.js index 27ab4afb..4fde5139 100644 --- a/test/dbnav-departures.js +++ b/test/dbnav-departures.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/dbnav/index.js'; const res = require('./fixtures/dbnav-departures.json'); import {dbnavDepartures as expected} from './fixtures/dbnav-departures.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/dbnav-refresh-journey.js b/test/dbnav-refresh-journey.js index b0b5c6e9..1b35ceed 100644 --- a/test/dbnav-refresh-journey.js +++ b/test/dbnav-refresh-journey.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/dbnav/index.js'; const res = require('./fixtures/dbnav-refresh-journey.json'); import {dbNavJourney as expected} from './fixtures/dbnav-refresh-journey.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/dbnav-stop.js b/test/dbnav-stop.js index 6338f59a..0e167b5a 100644 --- a/test/dbnav-stop.js +++ b/test/dbnav-stop.js @@ -10,7 +10,7 @@ import {profile as rawProfile} from '../p/dbnav/index.js'; const res = require('./fixtures/dbnav-stop.json'); import {dbnavDepartures as expected} from './fixtures/dbnav-stop.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/e2e/common.js b/test/e2e/common.js index 3b0034a4..ae97988a 100644 --- a/test/e2e/common.js +++ b/test/e2e/common.js @@ -3,7 +3,7 @@ import tap from 'tap'; import {createClient} from '../../index.js'; import {profile as dbProfile} from '../../p/db/index.js'; -const client = createClient(dbProfile, 'public-transport/hafas-client:test'); +const client = createClient(dbProfile, 'public-transport/hafas-client:test', {enrichStations: false}); tap.test('exposes the profile', (t) => { t.ok(client.profile); diff --git a/test/e2e/db.js b/test/e2e/db.js index bdc4fd13..d7d6da3a 100644 --- a/test/e2e/db.js +++ b/test/e2e/db.js @@ -82,7 +82,7 @@ const assertValidTickets = (test, tickets) => { } }; -const client = createClient(dbProfile, 'public-transport/hafas-client:test'); +const client = createClient(dbProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const berlinHbf = '8011160'; const münchenHbf = '8000261'; diff --git a/test/e2e/dbnav.js b/test/e2e/dbnav.js index ce1fd9e3..7f8e45e3 100644 --- a/test/e2e/dbnav.js +++ b/test/e2e/dbnav.js @@ -82,7 +82,7 @@ const assertValidTickets = (test, tickets) => { } }; -const client = createClient(dbProfile, 'public-transport/hafas-client:test'); +const client = createClient(dbProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const berlinHbf = '8011160'; const münchenHbf = '8000261'; diff --git a/test/format/db-journeys-query.js b/test/format/db-journeys-query.js index ebb6bab6..4ea19cba 100644 --- a/test/format/db-journeys-query.js +++ b/test/format/db-journeys-query.js @@ -4,7 +4,7 @@ import {createClient} from '../../index.js'; import {profile as rawProfile} from '../../p/db/index.js'; import {data as loyaltyCards} from '../../format/loyalty-cards.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = { diff --git a/test/format/dbnav-journeys-query.js b/test/format/dbnav-journeys-query.js index b5fb6342..b2874bdd 100644 --- a/test/format/dbnav-journeys-query.js +++ b/test/format/dbnav-journeys-query.js @@ -4,7 +4,7 @@ import {createClient} from '../../index.js'; import {profile as rawProfile} from '../../p/dbnav/index.js'; import {data as loyaltyCards} from '../../format/loyalty-cards.js'; -const client = createClient(rawProfile, 'public-transport/hafas-client:test'); +const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false}); const {profile} = client; const opt = {