mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
adapt tests & docs to 021ae45 & 3e672ee
📝 ✅
This commit is contained in:
parent
3e672eeabd
commit
ce880c06bd
2 changed files with 18 additions and 3 deletions
|
@ -179,7 +179,9 @@ The response may look like this:
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T19:09:00.000+01:00',
|
arrival: '2017-12-17T19:09:00.000+01:00',
|
||||||
departure: '2017-12-17T19:09:00.000+01:00'
|
arrivalPlatform: '1',
|
||||||
|
departure: '2017-12-17T19:09:00.000+01:00',
|
||||||
|
departurePlatform: '1'
|
||||||
}, /* … */ {
|
}, /* … */ {
|
||||||
stop: {
|
stop: {
|
||||||
type: 'station',
|
type: 'station',
|
||||||
|
@ -189,7 +191,9 @@ The response may look like this:
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T19:17:00.000+01:00',
|
arrival: '2017-12-17T19:17:00.000+01:00',
|
||||||
departure: '2017-12-17T19:17:00.000+01:00'
|
arrivalPlatform: '5',
|
||||||
|
departure: '2017-12-17T19:17:00.000+01:00',
|
||||||
|
departurePlatform: '5'
|
||||||
} ]
|
} ]
|
||||||
} ]
|
} ]
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,7 +99,18 @@ const createValidateStopover = (cfg) => {
|
||||||
a.strictEqual(typeof s.departureDelay, 'number', msg)
|
a.strictEqual(typeof s.departureDelay, 'number', msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
val.station(val, s.station, name + '.station')
|
if (is(s.arrivalPlatform)) {
|
||||||
|
const msg = name + '.arrivalPlatform must '
|
||||||
|
a.strictEqual(typeof s.arrivalPlatform, 'string', msg + 'be a string')
|
||||||
|
a.ok(s.arrivalPlatform, msg + 'not be empty')
|
||||||
|
}
|
||||||
|
if (is(s.departureDelay)) {
|
||||||
|
const msg = name + '.departurePlatform must '
|
||||||
|
a.strictEqual(typeof s.departurePlatform, 'string', msg + 'be a string')
|
||||||
|
a.ok(s.departurePlatform, msg + 'not be empty')
|
||||||
|
}
|
||||||
|
|
||||||
|
val.station(val, s.stop, name + '.stop')
|
||||||
}
|
}
|
||||||
return validateStopover
|
return validateStopover
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue