booking operations and trains scheduling also allocations

This commit is contained in:
marshal
2026-06-10 00:48:32 +03:00
parent 675975bc08
commit 5774d7db9d
180 changed files with 13423 additions and 3877 deletions

View File

@@ -0,0 +1,21 @@
import { deriveScheduleDirection } from './derive-schedule-direction.util';
describe('deriveScheduleDirection', () => {
it('returns IMPORT when origin is Djibouti', () => {
expect(
deriveScheduleDirection({ country: 'Djibouti' }, { country: 'Ethiopia' }),
).toBe('IMPORT');
});
it('returns EXPORT when destination is Djibouti and origin is not', () => {
expect(
deriveScheduleDirection({ country: 'Ethiopia' }, { country: 'Djibouti' }),
).toBe('EXPORT');
});
it('returns DOMESTIC for intra-Ethiopia routes', () => {
expect(
deriveScheduleDirection({ country: 'Ethiopia' }, { country: 'Ethiopia' }),
).toBe('DOMESTIC');
});
});