mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
adapt tests to 0a0cddc
This commit is contained in:
parent
f20931b6de
commit
5f39d2875c
7 changed files with 8 additions and 7 deletions
|
@ -66,7 +66,7 @@ const assertValidPrice = (t, p) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const test = tapePromise(tape)
|
const test = tapePromise(tape)
|
||||||
const client = createClient(dbProfile)
|
const client = createClient(dbProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const berlinHbf = '8011160'
|
const berlinHbf = '8011160'
|
||||||
const münchenHbf = '8000261'
|
const münchenHbf = '8000261'
|
||||||
|
|
|
@ -33,7 +33,7 @@ const cfg = {
|
||||||
const validate = createValidate(cfg, {})
|
const validate = createValidate(cfg, {})
|
||||||
|
|
||||||
const test = tapePromise(tape)
|
const test = tapePromise(tape)
|
||||||
const client = createClient(insaProfile)
|
const client = createClient(insaProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const magdeburgHbf = '8010224'
|
const magdeburgHbf = '8010224'
|
||||||
const magdeburgBuckau = '8013456'
|
const magdeburgBuckau = '8013456'
|
||||||
|
|
|
@ -59,7 +59,7 @@ const assertValidPrice = (t, p) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const test = tapePromise(tape)
|
const test = tapePromise(tape)
|
||||||
const client = createClient(nahshProfile)
|
const client = createClient(nahshProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const kielHbf = '9049079'
|
const kielHbf = '9049079'
|
||||||
const flensburg = '9027253'
|
const flensburg = '9027253'
|
||||||
|
|
|
@ -50,7 +50,7 @@ const assertValidPrice = (t, p) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const test = tapePromise(tape)
|
const test = tapePromise(tape)
|
||||||
const client = createClient(oebbProfile)
|
const client = createClient(oebbProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const salzburgHbf = '8100002'
|
const salzburgHbf = '8100002'
|
||||||
const wienFickeystr = '911014'
|
const wienFickeystr = '911014'
|
||||||
|
|
|
@ -5,6 +5,7 @@ const test = require('tape')
|
||||||
const createThrottledClient = require('../throttle')
|
const createThrottledClient = require('../throttle')
|
||||||
const vbbProfile = require('../p/vbb')
|
const vbbProfile = require('../p/vbb')
|
||||||
|
|
||||||
|
const userAgent = 'public-transport/hafas-client:test'
|
||||||
const spichernstr = '900000042101'
|
const spichernstr = '900000042101'
|
||||||
|
|
||||||
test('throttle works', (t) => {
|
test('throttle works', (t) => {
|
||||||
|
@ -15,7 +16,7 @@ test('throttle works', (t) => {
|
||||||
}
|
}
|
||||||
const mockProfile = Object.assign({}, vbbProfile, {transformReqBody})
|
const mockProfile = Object.assign({}, vbbProfile, {transformReqBody})
|
||||||
|
|
||||||
const client = createThrottledClient(mockProfile, 2, 1000)
|
const client = createThrottledClient(mockProfile, userAgent, 2, 1000)
|
||||||
for (let i = 0; i < 10; i++) client.departures(spichernstr, {duration: 1})
|
for (let i = 0; i < 10; i++) client.departures(spichernstr, {duration: 1})
|
||||||
|
|
||||||
t.plan(3)
|
t.plan(3)
|
||||||
|
|
|
@ -103,7 +103,7 @@ const validate = createValidate(cfg, {
|
||||||
})
|
})
|
||||||
|
|
||||||
const test = tapePromise(tape)
|
const test = tapePromise(tape)
|
||||||
const client = createClient(vbbProfile)
|
const client = createClient(vbbProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const amrumerStr = '900000009101'
|
const amrumerStr = '900000009101'
|
||||||
const spichernstr = '900000042101'
|
const spichernstr = '900000042101'
|
||||||
|
|
|
@ -30,7 +30,7 @@ const cfg = {
|
||||||
const validate = createValidate(cfg, {})
|
const validate = createValidate(cfg, {})
|
||||||
|
|
||||||
const test = tapePromise(tape)
|
const test = tapePromise(tape)
|
||||||
const client = createClient(vbnProfile)
|
const client = createClient(vbnProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const bremenHbf = '8000050'
|
const bremenHbf = '8000050'
|
||||||
const bremerhavenHbf = '8000051'
|
const bremerhavenHbf = '8000051'
|
||||||
|
|
Loading…
Add table
Reference in a new issue