- Introduced `PassengerInfo.tsx` for displaying trip details, including upcoming trips and fare information. - Added `PassengerSettings.tsx` for managing user-defined important places and fare settings. - Implemented validation functions for passenger settings in `passenger-settings.mjs`. - Created utility functions for transliterating stop names in `transliteration.ts`. - Developed weather hint functionality in `weather-hint.ts` to provide precipitation probabilities. - Established a mock server for testing passenger-related features in `passenger-server.mjs`. - Added comprehensive tests for passenger guide logic and transliteration functionality.
21 lines
1.1 KiB
JavaScript
21 lines
1.1 KiB
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { transliterateStopName } from '../src/lib/transliteration.ts';
|
|
|
|
test('stop names use readable Latin spelling without translating or losing punctuation', () => {
|
|
for (const [name, latin] of [
|
|
['Пушкинская', 'Pushkinskaya'],
|
|
['Швейная фабрика', 'Shveynaya fabrika'],
|
|
['Больница (Ксты)', 'Bolnitsa (Ksty)'],
|
|
['Педагогический колледж', 'Pedagogicheskiy kolledzh'],
|
|
['Боровуха-3 · Школа №9', 'Borovukha-3 · Shkola №9'],
|
|
['Ёлочная / Южная / Щорса', 'Yolochnaya / Yuzhnaya / Shchorsa'],
|
|
['КСТЫ — ТЦ «ЕВРООПТ»', 'KSTY — TTS «EVROOPT»'],
|
|
['Вуліца Янкі Купалы', 'Vulitsa Yanki Kupaly'],
|
|
['Уручча · Зялёны Луг', 'Uruchcha · Zyalyony Lug'],
|
|
['Мастоў · імя Янкі Купалы', 'Mastou · imya Yanki Kupaly'],
|
|
['RideBus PWA (2026)', 'RideBus PWA (2026)'],
|
|
['', ''],
|
|
]) assert.equal(transliterateStopName(name), latin, name);
|
|
});
|