mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
22 lines
666 B
TypeScript
22 lines
666 B
TypeScript
import { deriveTradeDirection } from './derive-trade-direction.util';
|
|
|
|
describe('deriveTradeDirection', () => {
|
|
it('returns IMPORT when origin is Djibouti', () => {
|
|
expect(deriveTradeDirection({ country: 'Djibouti' }, { country: 'Ethiopia' })).toBe(
|
|
'IMPORT',
|
|
);
|
|
});
|
|
|
|
it('returns EXPORT when destination is Djibouti and origin is not', () => {
|
|
expect(deriveTradeDirection({ country: 'Ethiopia' }, { country: 'Djibouti' })).toBe(
|
|
'EXPORT',
|
|
);
|
|
});
|
|
|
|
it('returns DOMESTIC for intra-Ethiopia routes', () => {
|
|
expect(deriveTradeDirection({ country: 'Ethiopia' }, { country: 'Ethiopia' })).toBe(
|
|
'DOMESTIC',
|
|
);
|
|
});
|
|
});
|