mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +00:00
fix(airports): keep airports OurAirports flags as having no scheduled service
The airport picker never offered Little Cayman (LYB): OurAirports marks it as having no scheduled service although it has daily flights, and the build dropped every airport on that flag. The same flag also hid Vestmannaeyjar, Western Sydney and around 1,280 other large and medium airports with an IATA code. The build now applies the flag to small airports only, where it keeps private airstrips out. The bundled list gains exactly those airports. Every entry it already carried stays unchanged, because a fresh OurAirports export currently renames PBI to DJT and drops nine other codes that saved bookings point at. Closes #2820
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The bundled assets/airports.json itself, not a fixture.
|
||||
*
|
||||
* OurAirports marks some airports with daily flights as having no scheduled
|
||||
* service, and the build used to drop them on that flag alone (#2820, Little
|
||||
* Cayman). These pin a few of them and the codes saved bookings already point at.
|
||||
*/
|
||||
import { findByIata } from '../../../../src/nest/airports/airports.data';
|
||||
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('bundled airport dataset', () => {
|
||||
it('AIRPORT-ASSET-001: keeps airports OurAirports flags as unscheduled', () => {
|
||||
expect(findByIata('LYB')?.name).toBe('Edward Bodden Little Cayman Airfield');
|
||||
expect(findByIata('VEY')?.country).toBe('IS');
|
||||
});
|
||||
|
||||
it('AIRPORT-ASSET-002: still resolves the codes it carried before', () => {
|
||||
for (const code of ['PBI', 'ADA', 'GCM', 'CYB', 'FRA']) {
|
||||
expect(findByIata(code), code).not.toBeNull();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user