mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
make tests more robust 💚
This commit is contained in:
parent
eab850e058
commit
c04e041338
3 changed files with 8 additions and 6 deletions
|
@ -98,7 +98,7 @@ test('Domain to 1104 Elm Street, Austin, TX 78703', async (t) => {
|
|||
test('Domain to Whole Foods Market - North Lamar Blvd', async (t) => {
|
||||
const wholeFoodsMarket = {
|
||||
type: 'location',
|
||||
id: '9845477',
|
||||
id: '9845565', // or `9871373`
|
||||
poi: true,
|
||||
name: 'Whole Foods Market - N Lamar Blvd',
|
||||
latitude: 30.270653,
|
||||
|
|
|
@ -327,7 +327,8 @@ test('nearby Salzburg Hbf', async (t) => {
|
|||
})
|
||||
|
||||
test('locations named Salzburg', async (t) => {
|
||||
const locations = await client.locations('Salzburg', {
|
||||
const salzburgVolksgarten = '591161'
|
||||
const locations = await client.locations('Salzburg volksgarten', {
|
||||
results: 20
|
||||
})
|
||||
|
||||
|
@ -337,7 +338,7 @@ test('locations named Salzburg', async (t) => {
|
|||
t.ok(locations.find(s => s.type === 'stop' || s.type === 'station'))
|
||||
t.ok(locations.find(s => s.poi)) // POIs
|
||||
t.ok(locations.some((s) => {
|
||||
return s.station && s.station.id === salzburgHbf || s.id === salzburgHbf
|
||||
return s.station && s.station.id === salzburgVolksgarten || s.id === salzburgVolksgarten
|
||||
}))
|
||||
|
||||
t.end()
|
||||
|
|
|
@ -246,7 +246,7 @@ test('departures with stop object', async (t) => {
|
|||
t.end()
|
||||
})
|
||||
|
||||
test('departures at Karlsplatz in direction of Pilgramgasse', async (t) => {
|
||||
test('departures at Uhlandstr., Saarbrücken in direction of Landwehrplatz', async (t) => {
|
||||
const saarbrueckenLandwehrplatz = '10606'
|
||||
await testDeparturesInDirection({
|
||||
test: t,
|
||||
|
@ -286,7 +286,8 @@ test('nearby Saarbrücken Hbf', async (t) => {
|
|||
})
|
||||
|
||||
test('locations named Saarbrücken', async (t) => {
|
||||
const locations = await client.locations('Saarbrücken', {
|
||||
const aufDerWerthBürgerpark = '10204'
|
||||
const locations = await client.locations('bürgerpark', {
|
||||
results: 20
|
||||
})
|
||||
|
||||
|
@ -296,7 +297,7 @@ test('locations named Saarbrücken', async (t) => {
|
|||
t.ok(locations.find(s => s.type === 'stop' || s.type === 'station'))
|
||||
t.ok(locations.find(s => s.poi)) // POIs
|
||||
t.ok(locations.some((s) => {
|
||||
return s.station && s.station.id === saarbrueckenHbf || s.id === saarbrueckenHbf
|
||||
return s.station && s.station.id === aufDerWerthBürgerpark || s.id === aufDerWerthBürgerpark
|
||||
}))
|
||||
|
||||
t.end()
|
||||
|
|
Loading…
Add table
Reference in a new issue