mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
21 lines
382 B
JavaScript
21 lines
382 B
JavaScript
const journeysFailsWithNoProduct = async (cfg) => {
|
|
const {
|
|
test: t,
|
|
fetchJourneys,
|
|
fromId,
|
|
toId,
|
|
when,
|
|
products
|
|
} = cfg
|
|
|
|
const noProducts = Object.create(null)
|
|
for (let p of products) noProducts[p.id] = false
|
|
|
|
await t.rejects(async () => {
|
|
await fetchJourneys(fromId, toId, {departure: when, products: noProducts})
|
|
})
|
|
}
|
|
|
|
export {
|
|
journeysFailsWithNoProduct,
|
|
}
|