mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-31 08:06:33 +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,
 | |
| }
 |