mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-11-04 10:06:32 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			397 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			397 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,
 | 
						|
};
 |