mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-31 16:16:32 +02:00 
			
		
		
		
	adapt tests to 7e39a2f
				
					
				
			This commit is contained in:
		
							parent
							
								
									7e39a2f333
								
							
						
					
					
						commit
						3b0740d310
					
				
					 2 changed files with 10 additions and 10 deletions
				
			
		|  | @ -65,7 +65,7 @@ const testEarlierLaterJourneys = async (cfg) => { | ||||||
| 	}) | 	}) | ||||||
| 	for (let j of earlier.journeys) { | 	for (let j of earlier.journeys) { | ||||||
| 		const firstLeg = j.legs[0] | 		const firstLeg = j.legs[0] | ||||||
| 		const dep = new Date(firstLeg.departure || firstLeg.formerScheduledDeparture) | 		const dep = new Date(firstLeg.departure || firstLeg.scheduledDeparture) | ||||||
| 		t.ok(dep < earliestDep) | 		t.ok(dep < earliestDep) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -76,7 +76,7 @@ const testEarlierLaterJourneys = async (cfg) => { | ||||||
| 	}) | 	}) | ||||||
| 	for (let j of later.journeys) { | 	for (let j of later.journeys) { | ||||||
| 		const firstLeg = j.legs[0] | 		const firstLeg = j.legs[0] | ||||||
| 		const dep = new Date(firstLeg.departure || firstLeg.formerScheduledDeparture) | 		const dep = new Date(firstLeg.departure || firstLeg.scheduledDeparture) | ||||||
| 		t.ok(dep > latestDep) | 		t.ok(dep > latestDep) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -126,20 +126,20 @@ const createValidateStopover = (cfg) => { | ||||||
| 			a.strictEqual(typeof s.arrivalPlatform, 'string', msg + 'be a string') | 			a.strictEqual(typeof s.arrivalPlatform, 'string', msg + 'be a string') | ||||||
| 			a.ok(s.arrivalPlatform, msg + 'not be empty') | 			a.ok(s.arrivalPlatform, msg + 'not be empty') | ||||||
| 		} | 		} | ||||||
| 		if (is(s.formerScheduledArrivalPlatform)) { | 		if (is(s.scheduledArrivalPlatform)) { | ||||||
| 			const msg = name + '.formerScheduledArrivalPlatform must ' | 			const msg = name + '.scheduledArrivalPlatform must ' | ||||||
| 			a.strictEqual(typeof s.formerScheduledArrivalPlatform, 'string', msg + 'be a string') | 			a.strictEqual(typeof s.scheduledArrivalPlatform, 'string', msg + 'be a string') | ||||||
| 			a.ok(s.formerScheduledArrivalPlatform, msg + 'not be empty') | 			a.ok(s.scheduledArrivalPlatform, msg + 'not be empty') | ||||||
| 		} | 		} | ||||||
| 		if (is(s.departurePlatform)) { | 		if (is(s.departurePlatform)) { | ||||||
| 			const msg = name + '.departurePlatform must ' | 			const msg = name + '.departurePlatform must ' | ||||||
| 			a.strictEqual(typeof s.departurePlatform, 'string', msg + 'be a string') | 			a.strictEqual(typeof s.departurePlatform, 'string', msg + 'be a string') | ||||||
| 			a.ok(s.departurePlatform, msg + 'not be empty') | 			a.ok(s.departurePlatform, msg + 'not be empty') | ||||||
| 		} | 		} | ||||||
| 		if (is(s.formerScheduledDeparturePlatform)) { | 		if (is(s.scheduledDeparturePlatform)) { | ||||||
| 			const msg = name + '.formerScheduledDeparturePlatform must ' | 			const msg = name + '.scheduledDeparturePlatform must ' | ||||||
| 			a.strictEqual(typeof s.formerScheduledDeparturePlatform, 'string', msg + 'be a string') | 			a.strictEqual(typeof s.scheduledDeparturePlatform, 'string', msg + 'be a string') | ||||||
| 			a.ok(s.formerScheduledDeparturePlatform, msg + 'not be empty') | 			a.ok(s.scheduledDeparturePlatform, msg + 'not be empty') | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		anyOf(['stop', 'station'], val, s.stop, name + '.stop') | 		anyOf(['stop', 'station'], val, s.stop, name + '.stop') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue