mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
journeys tests: expect 4 results ✅
The default nr of results returned by HAFAS seems to be `3`, so we pick a different one to assert that the `results` option actually works.
This commit is contained in:
parent
ea17443bd8
commit
8566bcc85f
10 changed files with 10 additions and 10 deletions
|
@ -67,7 +67,7 @@ const hour = 60 * 60 * 1000
|
||||||
|
|
||||||
test('journeys – Spichernstr. to Bismarckstr.', async (t) => {
|
test('journeys – Spichernstr. to Bismarckstr.', async (t) => {
|
||||||
const res = await client.journeys(spichernstr, bismarckstr, {
|
const res = await client.journeys(spichernstr, bismarckstr, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -43,7 +43,7 @@ const capitol591 = '591'
|
||||||
|
|
||||||
test('journeys – Broadie Oaks to Domain', async (t) => {
|
test('journeys – Broadie Oaks to Domain', async (t) => {
|
||||||
const res = await client.journeys(broadieOaks, domain, {
|
const res = await client.journeys(broadieOaks, domain, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -89,7 +89,7 @@ const potsdamHbf = '8012666'
|
||||||
|
|
||||||
test('journeys – Berlin Schwedter Str. to München Hbf', async (t) => {
|
test('journeys – Berlin Schwedter Str. to München Hbf', async (t) => {
|
||||||
const res = await client.journeys(blnSchwedterStr, münchenHbf, {
|
const res = await client.journeys(blnSchwedterStr, münchenHbf, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -48,7 +48,7 @@ const universitaet = '19686'
|
||||||
|
|
||||||
test('journeys – Magdeburg Hbf to Magdeburg-Buckau', async (t) => {
|
test('journeys – Magdeburg Hbf to Magdeburg-Buckau', async (t) => {
|
||||||
const res = await client.journeys(magdeburgHbf, magdeburgBuckau, {
|
const res = await client.journeys(magdeburgHbf, magdeburgBuckau, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,7 +6,7 @@ const testJourneysStationToStation = async (cfg) => {
|
||||||
validate(t, res, 'journeysResult', 'res')
|
validate(t, res, 'journeysResult', 'res')
|
||||||
const {journeys} = res
|
const {journeys} = res
|
||||||
|
|
||||||
t.strictEqual(journeys.length, 3)
|
t.strictEqual(journeys.length, 4)
|
||||||
for (let i = 0; i < journeys.length; i++) {
|
for (let i = 0; i < journeys.length; i++) {
|
||||||
const j = journeys[i]
|
const j = journeys[i]
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ const kielRaeucherei = '9049217'
|
||||||
|
|
||||||
test('journeys – Kiel Hbf to Flensburg', async (t) => {
|
test('journeys – Kiel Hbf to Flensburg', async (t) => {
|
||||||
const res = await client.journeys(kielHbf, flensburg, {
|
const res = await client.journeys(kielHbf, flensburg, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -68,7 +68,7 @@ const wienPilgramgasse = '1390562'
|
||||||
|
|
||||||
test.skip('journeys – Salzburg Hbf to Wien Westbahnhof', async (t) => {
|
test.skip('journeys – Salzburg Hbf to Wien Westbahnhof', async (t) => {
|
||||||
const res = await client.journeys(salzburgHbf, wienFickeystr, {
|
const res = await client.journeys(salzburgHbf, wienFickeystr, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -64,7 +64,7 @@ const poetschnerstr = {
|
||||||
|
|
||||||
test('journeys – Mittersendling to Karl-Theodor-Straße', async (t) => {
|
test('journeys – Mittersendling to Karl-Theodor-Straße', async (t) => {
|
||||||
const res = await client.journeys(mittersendling, karlTheodorStr, {
|
const res = await client.journeys(mittersendling, karlTheodorStr, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -54,7 +54,7 @@ test('journeys – Spichernstr. to Bismarckstr.', async (t) => {
|
||||||
id: spichernstr,
|
id: spichernstr,
|
||||||
name: 'U Spichernstr.'
|
name: 'U Spichernstr.'
|
||||||
}, bismarckstr, {
|
}, bismarckstr, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -41,7 +41,7 @@ const bremerhavenHbf = '8000051'
|
||||||
|
|
||||||
test.only('journeys – Bremen Hbf to Bremerhaven Hbf', async (t) => {
|
test.only('journeys – Bremen Hbf to Bremerhaven Hbf', async (t) => {
|
||||||
const res = await client.journeys(bremenHbf, bremerhavenHbf, {
|
const res = await client.journeys(bremenHbf, bremerhavenHbf, {
|
||||||
results: 3,
|
results: 4,
|
||||||
departure: when,
|
departure: when,
|
||||||
stopovers: true
|
stopovers: true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue