mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
move profile E2E tests to test/e2e
This commit is contained in:
parent
0165320808
commit
9318007455
36 changed files with 64 additions and 63 deletions
|
@ -64,7 +64,8 @@
|
|||
"vbb-stations-autocomplete": "^4.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "env NODE_ENV=dev node test/index.js",
|
||||
"prepublishOnly": "npm test | tap-spec"
|
||||
"e2e-test": "env NODE_ENV=dev node test/e2e/index.js | tap-spec",
|
||||
"test": "npm run e2e-test",
|
||||
"prepublishOnly": "npm test"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ const isRoughlyEqual = require('is-roughly-equal')
|
|||
const {DateTime} = require('luxon')
|
||||
const flatMap = require('lodash/flatMap')
|
||||
|
||||
const createClient = require('..')
|
||||
const bvgProfile = require('../p/bvg')
|
||||
const products = require('../p/bvg/products')
|
||||
const createClient = require('../..')
|
||||
const bvgProfile = require('../../p/bvg')
|
||||
const products = require('../../p/bvg/products')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const {
|
||||
cfg,
|
|
@ -6,9 +6,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const cflProfile = require('../p/cfl')
|
||||
const products = require('../p/cfl/products')
|
||||
const createClient = require('../..')
|
||||
const cflProfile = require('../../p/cfl')
|
||||
const products = require('../../p/cfl/products')
|
||||
const {
|
||||
line: createValidateLine,
|
||||
journeyLeg: createValidateJourneyLeg,
|
|
@ -5,9 +5,9 @@ const tapePromise = require('tape-promise').default
|
|||
const tape = require('tape')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const cmtaProfile = require('../p/cmta')
|
||||
const products = require('../p/cmta/products')
|
||||
const createClient = require('../..')
|
||||
const cmtaProfile = require('../../p/cmta')
|
||||
const products = require('../../p/cmta/products')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testJourneysStationToStation = require('./lib/journeys-station-to-station')
|
||||
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
const test = require('tape')
|
||||
|
||||
const createClient = require('..')
|
||||
const vbbProfile = require('../p/vbb')
|
||||
const parseDateTime = require('../parse/date-time')
|
||||
const createClient = require('../..')
|
||||
const vbbProfile = require('../../p/vbb')
|
||||
const parseDateTime = require('../../parse/date-time')
|
||||
|
||||
// todo: use a mock profile
|
||||
const client = createClient(vbbProfile, 'public-transport/hafas-client:test')
|
|
@ -5,12 +5,11 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const dbBusradarNrwProfile = require('../p/db-busradar-nrw')
|
||||
const createClient = require('../..')
|
||||
const dbBusradarNrwProfile = require('../../p/db-busradar-nrw')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testDepartures = require('./lib/departures')
|
||||
const testArrivals = require('./lib/arrivals')
|
||||
// const testJourneysWithDetour = require('./lib/journeys-with-detour')
|
||||
|
||||
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
||||
|
|
@ -7,9 +7,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const dbProfile = require('../p/db')
|
||||
const products = require('../p/db/products')
|
||||
const createClient = require('../..')
|
||||
const dbProfile = require('../../p/db')
|
||||
const products = require('../../p/db/products')
|
||||
const {
|
||||
station: createValidateStation,
|
||||
trip: createValidateTrip
|
|
@ -5,9 +5,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const hvvProfile = require('../p/hvv')
|
||||
const products = require('../p/hvv/products')
|
||||
const createClient = require('../..')
|
||||
const hvvProfile = require('../../p/hvv')
|
||||
const products = require('../../p/hvv/products')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testJourneysStationToStation = require('./lib/journeys-station-to-station')
|
||||
const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product')
|
16
test/e2e/index.js
Normal file
16
test/e2e/index.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
'use strict'
|
||||
|
||||
require('./common')
|
||||
require('./db')
|
||||
require('./vbb')
|
||||
require('./bvg')
|
||||
require('./oebb')
|
||||
require('./insa')
|
||||
require('./nahsh')
|
||||
require('./cmta')
|
||||
require('./nvv')
|
||||
require('./sbahn-muenchen')
|
||||
require('./saarfahrplan')
|
||||
require('./cfl')
|
||||
require('./hvv')
|
||||
require('./db-busradar-nrw')
|
|
@ -5,9 +5,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const insaProfile = require('../p/insa')
|
||||
const products = require('../p/insa/products')
|
||||
const createClient = require('../..')
|
||||
const insaProfile = require('../../p/insa')
|
||||
const products = require('../../p/insa/products')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testJourneysStationToStation = require('./lib/journeys-station-to-station')
|
||||
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
|
@ -3,7 +3,7 @@
|
|||
const stations = require('vbb-stations-autocomplete')
|
||||
const a = require('assert')
|
||||
const shorten = require('vbb-short-station-name')
|
||||
const products = require('../../p/bvg/products')
|
||||
const products = require('../../../p/bvg/products')
|
||||
|
||||
const {createWhen} = require('./util')
|
||||
const {
|
|
@ -5,9 +5,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const nahshProfile = require('../p/nahsh')
|
||||
const products = require('../p/nahsh/products')
|
||||
const createClient = require('../..')
|
||||
const nahshProfile = require('../../p/nahsh')
|
||||
const products = require('../../p/nahsh/products')
|
||||
const {
|
||||
line: createValidateLine,
|
||||
station: createValidateStation
|
|
@ -5,9 +5,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const nvvProfile = require('../p/nvv')
|
||||
const products = require('../p/nvv/products')
|
||||
const createClient = require('../..')
|
||||
const nvvProfile = require('../../p/nvv')
|
||||
const products = require('../../p/nvv/products')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testJourneysStationToStation = require('./lib/journeys-station-to-station')
|
||||
const journeysFailsWithNoProduct = require('./lib/journeys-fails-with-no-product')
|
|
@ -6,9 +6,9 @@ const isRoughlyEqual = require('is-roughly-equal')
|
|||
const validateLine = require('validate-fptf/line')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const oebbProfile = require('../p/oebb')
|
||||
const products = require('../p/oebb/products')
|
||||
const createClient = require('../..')
|
||||
const oebbProfile = require('../../p/oebb')
|
||||
const products = require('../../p/oebb/products')
|
||||
const {
|
||||
station: createValidateStation,
|
||||
stop: validateStop
|
|
@ -5,9 +5,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const { createWhen } = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const saarfahrplanProfile = require('../p/saarfahrplan')
|
||||
const products = require('../p/saarfahrplan/products')
|
||||
const createClient = require('../..')
|
||||
const saarfahrplanProfile = require('../../p/saarfahrplan')
|
||||
const products = require('../../p/saarfahrplan/products')
|
||||
const {
|
||||
station: createValidateStation,
|
||||
stop: validateStop
|
|
@ -5,9 +5,9 @@ const tapePromise = require('tape-promise').default
|
|||
const tape = require('tape')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const sMunichProfile = require('../p/sbahn-muenchen')
|
||||
const products = require('../p/sbahn-muenchen/products')
|
||||
const createClient = require('../..')
|
||||
const sMunichProfile = require('../../p/sbahn-muenchen')
|
||||
const products = require('../../p/sbahn-muenchen/products')
|
||||
const {movement: _validateMovement} = require('./lib/validators')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testJourneysStationToStation = require('./lib/journeys-station-to-station')
|
|
@ -3,9 +3,9 @@
|
|||
const tapePromise = require('tape-promise').default
|
||||
const tape = require('tape')
|
||||
|
||||
const createClient = require('..')
|
||||
const vbbProfile = require('../p/vbb')
|
||||
const products = require('../p/vbb/products')
|
||||
const createClient = require('../..')
|
||||
const vbbProfile = require('../../p/vbb')
|
||||
const products = require('../../p/vbb/products')
|
||||
const {
|
||||
cfg,
|
||||
validateStation,
|
|
@ -5,9 +5,9 @@ const tape = require('tape')
|
|||
const isRoughlyEqual = require('is-roughly-equal')
|
||||
|
||||
const {createWhen} = require('./lib/util')
|
||||
const createClient = require('..')
|
||||
const vbnProfile = require('../p/vbn')
|
||||
const products = require('../p/vbn/products')
|
||||
const createClient = require('../..')
|
||||
const vbnProfile = require('../../p/vbn')
|
||||
const products = require('../../p/vbn/products')
|
||||
const createValidate = require('./lib/validate-fptf-with')
|
||||
const testJourneysStationToStation = require('./lib/journeys-station-to-station')
|
||||
const testJourneysStationToAddress = require('./lib/journeys-station-to-address')
|
|
@ -4,20 +4,5 @@ require('./bvg-journey')
|
|||
require('./vbb-departures')
|
||||
require('./bvg-radar')
|
||||
|
||||
require('./common')
|
||||
require('./db')
|
||||
require('./vbb')
|
||||
require('./bvg')
|
||||
require('./oebb')
|
||||
require('./insa')
|
||||
require('./nahsh')
|
||||
require('./cmta')
|
||||
require('./nvv')
|
||||
require('./sbahn-muenchen')
|
||||
require('./saarfahrplan')
|
||||
require('./cfl')
|
||||
require('./hvv')
|
||||
require('./db-busradar-nrw')
|
||||
|
||||
require('./throttle')
|
||||
require('./retry')
|
||||
|
|
Loading…
Add table
Reference in a new issue