HamLogTools

Testing — HamLogTools

Slovenska različica / Slovenian version ↓


Overview

All tests run in Node.js using the built-in node:test runner — no external dependencies required.

Test file Tool Tests Groups
edi2adif.test.js edi2adif.html 122 9
edi-crosscheck.test.js edi-crosscheck.html 56 8
adif-merge.test.js adif-merge.html 112 21
adif-qrz-filter.test.js adif-qrz-filter.js 48 4
vhf-logger/vhf-logger.test.js vhf-logger/vhf-logger.html 191 17
adif-stats.test.js adif-stats.html 133 21
adif2cab.test.js adif2cab.html 191 31
edi-validator.test.js edi-validator.html 109 22

The sections below document each test file in detail.


Running the tests

node --test --test-reporter=spec edi2adif.test.js
node --test --test-reporter=spec edi-crosscheck.test.js
node --test --test-reporter=spec adif-merge.test.js
node --test --test-reporter=spec adif-qrz-filter.test.js
node --test --test-reporter=spec vhf-logger/vhf-logger.test.js
node --test --test-reporter=spec adif-stats.test.js
node --test --test-reporter=spec adif2cab.test.js
node --test --test-reporter=spec edi-validator.test.js

Requires Node.js v18 or later (node:test was stabilised in v18; the project was developed on v25).


How the tests work

edi2adif.html is a single-file browser app with no module system. The test file extracts the embedded <script> block at runtime and evaluates it inside a node:vm sandbox that provides a minimal DOM mock:

edi2adif.html ──► regex extract <script> ──► vm.createContext (mock DOM)
                                               └── vm.runInContext(script)
                                                        │
                                     function declarations promoted to ctx
                                                        │
                                   ctx.normBand, ctx.parseEDI, … exposed

The mock provides no-op implementations for document.getElementById, document.addEventListener, URL.createObjectURL, Blob, FileReader, etc. — enough for the script to initialise without a real browser.

vm prototype note: Objects returned by functions running inside a vm context share the vm’s Object.prototype, not the host’s. Using assert.deepStrictEqual on them fails even when all properties are identical. All assertions therefore compare individual properties with assert.equal.


Test groups

1 · normBand (27 tests)

Verifies the regex table that maps EDI PBand values to canonical ADIF band names and nominal frequencies.

Sub-group What is checked
Empty / unknown input Falsy input returns {band:'', freq:''}. Unrecognised strings pass through with no frequency. Whitespace is trimmed before matching.
6 m – 23 cm Each band matched by frequency (MHz), wavelength (e.g. 2m), and GHz strings with both dot and comma decimal separators.
Microwave bands 13 cm through 6 mm — band name verified for all eight entries.

2 · parseEDI (36 tests)

Exercises the EDI-to-QSO parser across header fields, record parsing, edge cases, and error handling.

Sub-group What is checked
Header extraction PCall, PWWLo, TName, SPowe, MOpe1/2 stored under lowercased keys in the header object. Band resolved via normBand.
QSO count ERROR callsigns and records with fewer than 10 semicolon-delimited fields are silently skipped.
Callsign normalisation Lowercased callsigns are uppercased.
Mode mapping EDI mode codes 1 → SSB, 2 → CW, 3 → CW, 4 → SSB, 5 → AM, 6 → FM, 7 → RTTY, 8 → SSTV, 9 → ATV.
Date parsing YYYYMMDD stored; DD.MM.YYYY display string generated. YY ≥ 90 → 1900+YY; YY < 90 → 2000+YY.
Time parsing HHMM stored; HH:MM display string generated.
RST & exchange rstS, rstR, stx, srx fields extracted from correct column positions.
Locator validation 6-character Maidenhead grids kept in mixed case (first 4 uppercase, last 2 lowercase — e.g. JN65ar); 4-character grids rejected (wwl set to '').
Distance Parsed as integer; zero preserved.
Duplicate flag Column 13 value Ddupe=true; absent → dupe=false.
Key generation _key follows CALL\|YYYYMMDD\|HHMM format; does not include band (that is added later by handleFiles).
Source tracking src filename attached to every QSO.
Edge cases Empty input, short records, CRLF line endings, minimum-field records (exactly 10 fields).

handleFiles is not tested here because it depends on the async browser FileReader API. Fields it adds to QSOs (myCall, myLoc, contest, pwr, ops, band, _bandKey) are therefore tested via the returned header object and the dedup group below.

3 · adifField (10 tests)

Verifies ADIF field serialisation: <TAG:length>value .

4 · csvEsc (11 tests)

Verifies CSV escaping for DARC QSL and generic CSV export.

5 · modeBadge (8 tests)

Verifies the mapping from mode string to CSS badge class used in the table renderer.

6 · i18n (5 tests)

Verifies the translation lookup function t(key) and setLang(lang).

7 · Duplicate detection (6 tests)

Verifies the cross-file deduplication algorithm from finishLoad.

The _all array is a lexical let binding inside the vm scope and cannot be mutated from outside. The 5-line algorithm is therefore reimplemented inline and tested in isolation:


8 · CSV export row format (9 tests)

Verifies the row-generation logic for the generic CSV export.

9 · Inline edit — field mutation (11 tests)

Verifies the save logic from commitEdit().

startEdit/commitEdit manipulate real DOM nodes and cannot be driven from a vm context without full browser APIs. The mutation logic is replicated inline and tested in isolation.

Sub-group What is checked
Basic fields rstS, rstR, and mode are trimmed and saved directly to the QSO object.
Locator validation Valid 6-char Maidenhead grid (A–R, 0–9, A–X) saved in mixed case (first 4 uppercase, last 2 lowercase; e.g. JN65ar). 4-char, 8-char, non-Maidenhead characters, S–Z first pair, and non-digit middle pair are all rejected and clear wwl to ''.

What is not tested

Area Reason
handleFiles Requires async browser FileReader; not polyfillable in a pure vm context.
finishLoad / DOM update functions Call document.getElementById(...).style, .innerHTML, etc. on real DOM nodes; only meaningful in a browser.
Export functions (exportADIF, exportDARC, exportCSV) Depend on _all state, DOM checkboxes, and Blob/URL.createObjectURL. End-to-end browser tests (e.g. Playwright) would be needed.
Sorting (sortFiltered, setSort) Depends on _filtered state; testable only with a full state setup.


Testiranje — HamLogTools [SL]

Pregled

Vsi testi tečejo v Node.js z vgrajenim izvajalcem node:test — brez zunanjih odvisnosti.

Testna datoteka Orodje Testov Skupin
edi2adif.test.js edi2adif.html 122 9
edi-crosscheck.test.js edi-crosscheck.html 56 8
adif-merge.test.js adif-merge.html 112 21
adif-qrz-filter.test.js adif-qrz-filter.js 48 4
vhf-logger/vhf-logger.test.js vhf-logger/vhf-logger.html 191 17
adif-stats.test.js adif-stats.html 133 21
adif2cab.test.js adif2cab.html 191 31
edi-validator.test.js edi-validator.html 109 22

Spodnji razdelki dokumentirajo vsako testno datoteko podrobno.


Zaganjanje testov

node --test --test-reporter=spec edi2adif.test.js
node --test --test-reporter=spec edi-crosscheck.test.js
node --test --test-reporter=spec adif-merge.test.js
node --test --test-reporter=spec adif-qrz-filter.test.js
node --test --test-reporter=spec vhf-logger/vhf-logger.test.js
node --test --test-reporter=spec adif-stats.test.js
node --test --test-reporter=spec adif2cab.test.js
node --test --test-reporter=spec edi-validator.test.js

Zahteva Node.js v18 ali novejši (node:test je bil stabiliziran v v18; projekt je bil razvit na v25).


Kako testi delujejo

edi2adif.html je enostranska brskalniška aplikacija brez sistema modulov. Testna datoteka ob zagonu izvleče vgrajeni blok <script> in ga izvede znotraj peskovnika node:vm, ki zagotavlja minimalni nadomestek DOM-a:

edi2adif.html ──► regex izvleče <script> ──► vm.createContext (nadom. DOM)
                                                └── vm.runInContext(skripta)
                                                         │
                                      deklaracije funkcij prenesene v ctx
                                                         │
                                   ctx.normBand, ctx.parseEDI, … dostopni

Nadomestek zagotavlja brezdejavne implementacije za document.getElementById, document.addEventListener, URL.createObjectURL, Blob, FileReader itd. — dovolj, da se skripta inicializira brez pravega brskalnika.

Opomba o prototipih vm: Objekti, ki jih vrnejo funkcije v vm kontekstu, delijo Object.prototype iz vm, ne iz gostitelja. Zato assert.deepStrictEqual na njih ne uspe, čeprav so vse lastnosti identične. Vsa primerjanja zato primerjajo posamezne lastnosti z assert.equal.


Skupine testov

1 · normBand (27 testov)

Preverja tabelo regularnih izrazov, ki preslika vrednosti EDI PBand v kanonična imena pasov ADIF in nominalne frekvence.

Podskupina Kaj se preverja
Prazen / neznan vnos Lažni vnos vrne {band:'', freq:''}. Neprepoznani nizi se prenesejo brez frekvence. Beli prostor se obreže pred ujemanjem.
6 m – 23 cm Vsak pas se ujema po frekvenci (MHz), valovni dolžini (npr. 2m) in nizih GHz z decimalno piko in vejico.
Mikrovalovni pasovi 13 cm do 6 mm — ime pasu preverjeno za vseh osem vnosov.

2 · parseEDI (36 testov)

Preverja razčlenjevalnik EDI v QSO prek polj glave, razčlenjevanja zapisov, robnih primerov in obravnavanja napak.

Podskupina Kaj se preverja
Ekstrakcija glave PCall, PWWLo, TName, SPowe, MOpe1/2 shranjeni pod ključi z malimi črkami v objektu header. Pas razrešen prek normBand.
Število QSO Klicni znaki ERROR in zapisi z manj kot 10 polji (ločenimi s podpičjem) so tiho preskočeni.
Normalizacija klicnega znaka Klicni znaki z malimi črkami se pretvorijo v velike.
Mapiranje načina EDI kode načina 1 → SSB, 2 → CW, 3 → CW, 4 → SSB, 5 → AM, 6 → FM, 7 → RTTY, 8 → SSTV, 9 → ATV.
Razčlenjevanje datuma Shranjeno YYYYMMDD; generiran prikazni niz DD.MM.YYYY. LL ≥ 90 → 1900+LL; LL < 90 → 2000+LL.
Razčlenjevanje časa Shranjeno HHMM; generiran prikazni niz HH:MM.
RST in izmenjava Polja rstS, rstR, stx, srx izvlečena iz pravilnih položajev stolpcev.
Validacija lokatorja Maidenhead mreže s 6 znaki se ohranijo z mešanimi črkami (prvi 4 znaki z velikimi, zadnja 2 z malimi — npr. JN65ar); mreže s 4 znaki so zavrnjene (wwl nastavljeno na '').
Razdalja Razčlenjena kot celo število; ničla ohranjena.
Zastavica duplikata Vrednost D v stolpcu 13 → dupe=true; odsotnost → dupe=false.
Generiranje ključa _key sledi obliki KLICNI_ZNAK\|YYYYMMDD\|HHMM; ne vsebuje pasu (ta se doda pozneje v handleFiles).
Sledenje izvoru Ime datoteke src je pripeto vsakemu QSO.
Robni primeri Prazen vnos, kratki zapisi, zaključki vrstic CRLF, zapisi z minimalnim številom polj (točno 10).

handleFiles tu ni testiran, ker je odvisen od asinhronega brskalnikovega API-ja FileReader. Polja, ki jih doda QSO-jem (myCall, myLoc, contest, pwr, ops, band, _bandKey), so zato preverjena prek vrnjenega objekta header in spodnje skupine za deduplikacijo.

3 · adifField (10 testov)

Preverja serializacijo polj ADIF: <OZNAKA:dolžina>vrednost .

4 · csvEsc (11 testov)

Preverja ubežanje CSV za izvoz DARC QSL in generični CSV.

5 · modeBadge (8 testov)

Preverja preslikavo niza načina v razred CSS značke, ki se uporablja v prikazu tabele.

6 · i18n (5 testov)

Preverja funkcijo za iskanje prevodov t(ključ) in setLang(jezik).

7 · Zaznavanje duplikatov (6 testov)

Preverja algoritem deduplikacije iz finishLoad.

Polje _all je leksikalna vezava let znotraj obsega vm in je ni mogoče mutirati od zunaj. 5-vrstični algoritem je zato reimplementiran neposredno in testiran v izolaciji:


8 · Format vrstice CSV izvoza (9 testov)

Preverja logiko generiranja vrstic za generični CSV izvoz.

9 · Urejanje v živo — mutacija polj (11 testov)

Preverja logiko shranjevanja iz commitEdit().

startEdit/commitEdit manipulirata z resničnimi vozlišči DOM in ju ni mogoče izvajati iz vm konteksta brez polnih brskalniških API-jev. Logika mutacije je reimplementirana neposredno in testirana v izolaciji.

Podskupina Kaj se preverja
Osnovna polja rstS, rstR in mode so obrezani in shranjeni neposredno v objekt QSO.
Validacija lokatorja Veljavna 6-znakovna Maidenhead mreža (A–R, 0–9, A–X) se shrani z mešanimi črkami (prvi 4 z velikimi, zadnja 2 z malimi; npr. JN65ar). 4-znakovni, 8-znakovni, znaki zunaj Maidenhead, prvi par S–Z in nečiselni srednji par so zavrnjeni in wwl se postavi na ''.

edi-crosscheck.test.js — 56 tests · 8 groups

Covers the pure logic of edi-crosscheck.html: suffix stripping, edit distance, EDI parsing, and all crosscheck algorithms including configurable thresholds and missing-locator suggestions.

How the tests work

edi-crosscheck.html is evaluated inside a node:vm context, the same pattern as edi2adif.html. Unlike that tool, no code is stripped — instead a Proxy-based DOM mock absorbs all property access and method calls silently, so the startup event-wiring runs without error.

Module-level state (_histDB, _results) is const/let and therefore not accessible as ctx properties. Tests route all state through function declarations:

Test groups

1 · baseCall (13 tests)

Verifies suffix stripping for crosscheck matching.

2 · levenshtein (9 tests)

Verifies the Levenshtein distance function with maxDist=2 early-exit.

3 · parseEDI (9 tests)

Verifies QSO extraction from an EDI file fragment.

4 · runCrosscheck — locator mismatch (6 tests)

Test What is verified
Clean match No issue when locator equals historical mode
High severity LOC_MISMATCH severity high when mode confidence ≥ 60% and new locator never seen
Medium severity LOC_MISMATCH severity med when new locator appeared before (e.g. portable operation)
Threshold No flag when callsign has fewer than 3 historical appearances
No locator No LOC_MISMATCH when QSO has no locator (wwl = '') — instead LOC_MISSING may be raised
allLocs order Historical locator list in the issue is sorted by count descending

5 · runCrosscheck — callsign check (8 tests)

Test What is verified
CALL_SIMILAR d=1 Call not in history; distance-1 match found and ranked first
CALL_UNKNOWN Call not in history; no similar found within distance 2
In history No call issue when base call exists in DB
Portable normalisation S59ABC/P matched against S59ABC history — no call flag
Sort order Similar suggestions sorted by distance ASC, then count DESC
Distance 2 Distance-2 matches also flagged (CALL_SIMILAR)
Combined issues Unknown call produces only CALL_SIMILAR; no spurious LOC issue without history
Deduplication Repeated unknown call in new log reuses precomputed similar-call list

6 · runCrosscheck — missing locator suggestion (4 tests)

Test What is verified
Suggests mode locator LOC_MISSING raised when new log QSO has no locator but history exists
Medium severity LOC_MISSING severity med when mode confidence is below the threshold
Threshold No LOC_MISSING when fewer than _minAppearances historical entries
Empty history locators No LOC_MISSING when all historical entries have empty locators

7 · runCrosscheck — configurable thresholds (3 tests)

Test What is verified
_minAppearances No flag when historical count is below the slider threshold
_minConfidence Severity respects the confidence slider (high vs med)
Empty locators ignored Empty historical locators do not affect mode calculation

8 · runCrosscheck — callsign by locator (4 tests)

Test What is verified
CALL_BY_LOC basic Suggests calls historically seen from the same locator and within Levenshtein ≤ 2
No match No CALL_BY_LOC when no historical calls from that locator are within distance 2
Separate from CALL_SIMILAR CALL_BY_LOC and CALL_SIMILAR appear as distinct issues in the result
Redundant coexistence CALL_BY_LOC is raised even when its candidates overlap with CALL_SIMILAR — both signals are shown as corroborating evidence

adif-merge.test.js — 112 tests · 21 groups

Covers the pure logic of adif-merge.html: ADIF parsing, deduplication, field normalization, export helpers, XSS escaping, CSV escaping, i18n key completeness, and regression tests for code-review fixes.

How the tests work

adif-merge.html is evaluated inside a node:vm context using the same Proxy-based DOM mock as the other HTML tools. Module-level let bindings are not ctx properties; these test helpers are injected via a second vm.runInContext call:

A local adif() helper computes :length from the actual string value of each field, so test fixtures are not brittle against length miscalculations.

Test groups

1 · parseADIF — basic extraction (9 tests)

2 · parseADIF — date/time normalization (7 tests)

3 · parseADIF — multi-record / edge cases (9 tests)

4 · parseADIF — fields dict kept in sync (4 tests)

Normalization writes back to q.fields so ADIF export is lossless and uses the normalized value:

5 · updateKey (3 tests)

6 · recomputeDupes (7 tests)

7 · parseADIF dedup key uniqueness (4 tests)

Integration — keys round-trip correctly through parse + updateKey:

8 · adifField (7 tests)

9 · htmlEsc (9 tests)

10 · csvEsc (7 tests)

11 · modeBadge (13 tests)

12 · buildFilename (6 tests)

13 · ADIF export — field preservation (2 tests)

14 · I18N (4 tests)

15 · parseADIF — real-world fixtures (4 tests)

16 · parseADIF — missing optional fields (5 tests)

Regression — parser must not crash when optional fields are absent:

17 · parseADIF — no submode property on QSO object (2 tests)

Regression — SUBMODE was a dead property removed from the QSO object during code review:

18 · adifField — export consistency (3 tests)

19 · updateKey — empty band handling (2 tests)

Documents behavior when band is absent — no crash, produces CALL||MODE|DATE|TIME; two such QSOs with identical other fields share the same key (will be deduped).

20 · I18N — errBand key (3 tests)

Regression — errBand translation key added during code review:

21 · parseADIF — re-merge safety (APP_ADIFMERGE_SRC) (2 tests)

Regression — re-merging a previously merged ADIF file must not duplicate the provenance tag:


CLI Tool Tests — adif-qrz-filter.test.js

A separate test suite covers the Node.js CLI tool. It also uses node:test with no external dependencies.

Tests: 48 across 4 test groups

Running

node --test adif-qrz-filter.test.js
node --test --test-reporter=spec adif-qrz-filter.test.js

Test groups

# Group Tests What is checked
1 parseAdif 6 ADIF parsing: header extraction, record splitting, QSL_VIA extraction, CRLF handling, missing CALL skipping
2 extractField 8 Generic <TAG:length>value extraction for CALL, QSL_VIA, case-insensitivity, trimming, uppercasing, ADIF type specifier (<TAG:len:TYPE>)
3 usesQslBuro 31 Fuzzy logic: 12 positive cases (buro/bureau + European variants: buero/büro/buerau/boureau/burea/buiro; “Direct or Bureau” wins), 16 negative cases (no/direct only/only via LoTW/eQSL only/”QSL via CALL”), 3 edge cases (null/empty)
4 cache 3 JSON cache save/load round-trip, 7-day TTL purge, missing file handling

How the tests work

The CLI tool is evaluated inside a node:vm context that stubs fs, https, process, and console. Pure functions (parseAdif, extractField, usesQslBuro, loadCache, saveCache) are extracted and tested directly.

Note on deepStrictEqual: As with the edi2adif.html vm tests, assert.deepStrictEqual on vm-created objects can fail even when properties are identical. The cache tests therefore use assert.equal on individual properties or Object.keys().length for empty-object checks.


vhf-logger/vhf-logger.test.js — 191 tests · 17 groups

Covers the pure logic of vhf-logger/vhf-logger.html: callsign normalization, band mapping, geo utilities, dupe detection, dupe recalculation, EDI build, crosscheck lookup, EDI import parsing, ZIP generation, band colors, manual time state, and backup/restore validation.

How the tests work

vhf-logger/vhf-logger.html is evaluated inside a node:vm context using the same Proxy-based DOM mock as edi-crosscheck.html. Because module-level let bindings are not ctx properties, helpers are injected via a second vm.runInContext call. The ctx also explicitly receives TextEncoder, TextDecoder, Uint8Array, DataView, and ArrayBuffer so that makeZip can run correctly:

Test groups

1 · baseCall (10 tests)

Verifies suffix stripping used for dupe detection and crosscheck lookup.

2 · normBand (10 tests)

Verifies the band mapping table.

3 · locToLatLon (7 tests)

Verifies Maidenhead locator → latitude/longitude conversion.

4 · haversine (4 tests)

Verifies great-circle distance calculation.

5 · calcBearing (5 tests)

Verifies great-circle bearing calculation.

6 · levenshtein (7 tests)

Verifies the Levenshtein distance function with maxDist=2 early exit.

7 · isDupe (7 tests)

Verifies dupe detection using baseCall() normalization and excludeId.

8 · recalcDupes (4 tests)

Verifies full dupe-flag recalculation across a session.

9 · buildEdi (57 tests)

Verifies REG1TEST EDI v1 output format.

10 · lookupCall (6 tests)

Verifies crosscheck lookup against the weighted+raw baseline DB.

11 · sessionEdit (10 tests)

Verifies state and i18n coverage for the session-editing feature.

12 · parseEdiForImport (10 tests)

Verifies EDI file parsing for the import feature.

13 · makeZip (5 tests)

Verifies the minimal ZIP generator (STORE/no-compression).

14 · bandColors (4 tests)

Verifies the BAND_COLORS map used to colour band tabs.

15 · manualTime (7 tests)

Verifies manual UTC time override state and i18n keys for new features.

16 · backup (32 tests)

Verifies validateBackup() structure checks and i18n strings for the backup/restore feature.

17 · I18N (3 tests)

Verifies i18n key symmetry between SL and EN translations.


adif-stats.test.js — 133 tests · 21 groups

Covers the pure logic of adif-stats.html: DXCC prefix lookup, band/mode normalisation, locator conversion, QRB calculation, ADIF parsing, statistics aggregation, filter logic, date/month formatting, XSS escaping, SVG chart helpers, and i18n key completeness.

How the tests work

adif-stats.html is evaluated inside a node:vm context using the same mock setup as the other HTML tools. Only the <script> block is extracted; the minimal mock provides localStorage, document.getElementById, URL, Blob, setTimeout, and console.

Pure functions are accessed directly as context properties: lookupCall, normBand, normMode, locToLatLon, haversine, parseADIF, computeStats, fmtDate, fmtMonth, htmlEsc, svgHBar, svgVBar, t.

An adif() helper builds minimal ADIF fixture strings with correct <TAG:length>value encoding.

Test groups

1 · lookupCall (17 tests)

Verifies DXCC entity lookup by callsign prefix using the built-in PREFIX_DB table.

2 · normBand (5 tests)

3 · normMode (5 tests)

4 · locToLatLon (5 tests)

5 · haversine (5 tests)

6 · parseADIF — basic extraction (9 tests)

7 · parseADIF — date/time/QRB (8 tests)

8 · parseADIF — country/cont (3 tests)

9 · computeStats — overview (7 tests)

10 · computeStats — aggregates (9 tests)

11 · applyFilters — date filter (6 tests)

Replicates the date-range filtering logic in isolation:

12 · fmtDate (4 tests)

13 · fmtMonth (3 tests)

14 · htmlEsc (7 tests)

15 · svgHBar (6 tests)

16 · svgVBar (6 tests)

17 · I18N (8 tests)

18 · computeStats — byDay (3 tests)

19 · computeStats — byBandHour (4 tests)

20 · computeStats — byDxcc / byBandDxcc (5 tests)

21 · computeStats — qrbBuckets (8 tests)


adif2cab.test.js — 191 tests · 31 groups

Covers the pure logic of adif2cab.html: Cabrillo mode mapping, RST defaults, frequency conversion, ADIF parsing, exchange extraction per contest, QSO line formatting, XSS escaping, badge helpers, CONTESTS array structure, and i18n key completeness.

How the tests work

adif2cab.html is evaluated inside a node:vm context using the same Proxy-based DOM mock as the other HTML tools. Only the <script> block is extracted. Pure functions are accessed directly as context properties.

Three injected helpers give access to const/let module state:

A local adif() helper builds ADIF fixture strings with correct <TAG:length>value encoding. A makeQso() helper builds a minimal QSO object with sensible defaults; individual fields are overridden per test via spread.

Test groups

1 · modeToCAB — phone modes → PH (5 tests)

2 · modeToCAB — CW → CW (2 tests)

3 · modeToCAB — FM-based voice → FM (5 tests)

Cabrillo v3 spec defines FM as a distinct mode value (not PH).

4 · modeToCAB — RTTY → RY (2 tests)

Cabrillo v3 spec defines RY for RTTY (not the DG catch-all).

5 · modeToCAB — digital modes → DG (8 tests)

6 · dfltRST (7 tests)

7 · freqToKHz — FREQ field conversion (6 tests)

8 · freqToKHz — BAND_KHZ fallback (10 tests)

9 · parseADIF — basic extraction (8 tests)

10 · parseADIF — date/time normalization (7 tests)

11 · parseADIF — multi-record / edge cases (11 tests)

12 · extractExchR — CQ-WW-SSB (6 tests)

13 · extractExchR — CQ-WW-CW (3 tests)

14 · extractExchR — IARU-HF (6 tests)

15 · extractExchR — ARRL-DX (6 tests)

16 · extractExchR — GENERIC (5 tests)

17 · extractExchR — CQ-WW-RTTY (5 tests)

18 · extractExchR — IARU-VHF (7 tests)

19 · extractExchR — CQ-WPX-SSB (4 tests)

20 · extractExchR — CQ-WPX-CW (3 tests)

21 · formatCabDate (7 tests)

22 · buildQSOLine — structure (12 tests)

23 · buildQSOLine — exchange handling (6 tests)

24 · buildQSOLine — RST defaults (3 tests)

25 · buildQSOLine — IARU-VHF locator exchange (4 tests)

26 · buildQSOLine — CQ WPX per-QSO serial (3 tests)

27 · htmlEsc (9 tests)

28 · cabModeBadge (6 tests)

Maps Cabrillo mode to CSS badge class for the preview table.

29 · modeBadge (9 tests)

Maps ADIF mode to CSS badge class for the preview table.

30 · CONTESTS — structure (11 tests)

31 · I18N (4 tests)


edi-validator.test.js — 109 tests · 22 groups

Covers the pure logic of edi-validator.html: Maidenhead geo utilities, and the full validate() function across all spec checks and issue types.

How the tests work

edi-validator.html is evaluated inside a node:vm context using the same Proxy-based DOM mock as the other HTML tools. The validate(text) function is accessed directly as a context property and accepts raw EDI file text, returning {issues[], qsoCount}.

The S i18n object (const S = {sl:{...}, en:{...}}) is exported via a second vm.runInContext('globalThis._S = S', ctx) call. A minimal valid EDI fixture is defined in the test file and used as a base for mutation-based tests (each test mutates one aspect of the fixture to trigger a specific issue code).

Test groups

1 · locToLatLon (4 tests)

Verifies Maidenhead locator → latitude/longitude conversion.

2 · haversine (2 tests)

Verifies great-circle distance calculation.

3 · validate — clean EDI (4 tests)

Baseline sanity check with a well-formed EDI fixture.

4 · validate — structure (6 tests)

Checks for required section markers and blank-line rules.

5 · validate — non-spec keywords (6 tests)

Checks for keywords not defined in the REG1TEST v1 spec.

6 · validate — header formats (8 tests)

Checks header field syntax.

7 · validate — ZRS mandatory fields (6 tests)

Checks ZRS-required fields are non-empty.

8 · validate — QSO count (3 tests)

Checks declared vs. actual QSO count.

9 · validate — QSO field count (3 tests)

Checks each QSO record has exactly 15 semicolon-delimited fields.

10 · validate — QSO date (6 tests)

Checks QSO date field (YYMMDD at col 0).

11 · validate — QSO time (4 tests)

Checks QSO time field (HHMM at col 1).

12 · validate — QSO mode (5 tests)

Checks QSO mode field (col 3, valid values 0–9; mode 0 = “none of below” per spec).

13 · validate — QSO dupe flag (6 tests)

Checks QSO dupe flag field (col 14, valid values empty or D).

14 · validate — QSO WWL format (4 tests)

Checks QSO locator field (col 9).

15 · validate — QRB deviation (5 tests)

Checks declared QRB (col 10) against haversine-calculated distance.

16 · validate — line length (2 tests)

Checks each line does not exceed 75 characters.

17 · validate — non-ASCII characters (3 tests)

Checks for characters outside the 7-bit ASCII range (spec §15.3.4).

18 · validate — duplicate keywords (4 tests)

Checks that each header keyword appears at most once.

19 · validate — QSO date day (5 tests)

Checks that the day value is valid for the given month and year (leap year aware).

20 · validate — QSO date range (5 tests)

Checks that QSO dates fall within the TDate header range (YYYYMMDD;YYYYMMDD).

21 · validate — QSO RST format (13 tests)

Checks RST fields (col 4 = RST sent, col 6 = RST received) match the expected digit count for the mode. Rules: SSB/AM/FM (modes 1/4/5/6) → 2 digits; CW/RTTY (modes 2/3/7) → 3 digits; modes 0/8/9 → check skipped. Empty RST is always allowed.

22 · I18N (5 tests)

Verifies i18n key completeness and translation distinctness.


edi-crosscheck.test.js — 56 testov · 8 skupin

Pokriva čisto logiko edi-crosscheck.html: odstranjevanje pripon, razdalja urejanja, razčlenjevanje EDI in vse algoritme crosschecka, vključno z nastavljivimi pragovi in predlogi za manjkajoče lokatorje.

Kako testi delujejo

edi-crosscheck.html se izvede znotraj konteksta node:vm po enakem vzorcu kot edi2adif.html. Za razliko od tega orodja kode ne odstranjujemo — namesto tega nadomestek DOM na osnovi Proxy tiho absorbira vse dostope do lastnosti in klice metod, tako da se začetno priklapljanje poslušalcev dogodkov izvede brez napak.

Stanje na ravni modula (_histDB, _results) je const/let in zato ni dostopno kot lastnost ctx. Testi upravljajo z vsem stanjem prek deklaracij funkcij:

Skupine testov

1 · baseCall (13 testov)

Preverja odstranjevanje pripon za ujemanje pri crosschecku.

2 · levenshtein (9 testov)

Preverja funkcijo Levenshteinove razdalje z zgodnjim izhodom pri maxDist=2.

3 · parseEDI (9 testov)

Preverja ekstrakcijo QSO iz fragmenta EDI datoteke.

4 · runCrosscheck — neskladje lokatorja (6 testov)

Test Kaj se preverja
Čisto ujemanje Brez težave, ko se lokator ujema z zgodovinskim modusom
Visoka resnost LOC_MISMATCH resnost high, ko zaupanje v modus ≥ 60% in nov lokator še nikoli ni bil viden
Srednja resnost LOC_MISMATCH resnost med, ko je bil nov lokator že viden (npr. prenosna postaja)
Prag Brez zastavice, ko ima klicni znak manj kot 3 zgodovinska pojavitev
Brez lokatorja Ni LOC_MISMATCH, ko QSO nima lokatorja (wwl = '') — namesto tega se lahko pojavi LOC_MISSING
Vrstni red allLocs Seznam zgodovinskih lokatorjev v težavi je razvrščen po številu padajoče

5 · runCrosscheck — preverjanje klicnega znaka (8 testov)

Test Kaj se preverja
CALL_SIMILAR d=1 Klicni znak ni v zgodovini; ujemanje z razdaljo 1 najdeno in razvrščeno na vrhu
CALL_UNKNOWN Klicni znak ni v zgodovini; ni podobnega v razdalji 2
V zgodovini Brez težave z klicnim znakom, ko bazni klicni znak obstaja v bazi
Normalizacija prenosnih S59ABC/P se primerja z zgodovino S59ABC — brez zastavice klicnega znaka
Vrstni red Podobni predlogi razvrščeni po razdalji naraščajoče, nato po številu padajoče
Razdalja 2 Ujemanja z razdaljo 2 so prav tako označena (CALL_SIMILAR)
Kombinacija težav Neznani klicni znak ustvari samo CALL_SIMILAR; brez napačne LOC težave brez zgodovine
Deduplikacija Ponavljajoči se neznani klicni znak v novem dnevniku ponovno uporabi preračunan seznam podobnih

6 · runCrosscheck — predlog za manjkajoč lokator (4 testa)

Test Kaj se preverja
Predlagaj modus LOC_MISSING se sproži, ko nov dnevnik nima lokatorja, a zgodovina obstaja
Srednja resnost LOC_MISSING resnost med, ko je zaupanje v modus pod pragom
Prag Ni LOC_MISSING, ko je zgodovinskih pojavitev manj kot _minAppearances
Prazni lokatorji v zgodovini Ni LOC_MISSING, ko imajo vsi zgodovinski vnosi prazne lokatorje

7 · runCrosscheck — nastavljivi pragovi (3 teste)

Test Kaj se preverja
_minAppearances Ni zastavice, ko je zgodovinsko število pod pragom drsnika
_minConfidence Resnost upošteva prag zaupanja drsnika (high vs med)
Prazni lokatorji prezrti Prazni zgodovinski lokatorji ne vplivajo na izračun modusa

8 · runCrosscheck — klicni znak po lokatorju (4 testi)

Test Kaj se preverja
CALL_BY_LOC osnovno Predlaga klicne znake, ki so bili zgodovinsko videni z istega lokatorja in so v razdalji Levenshtein ≤ 2
Brez ujemanja Ni CALL_BY_LOC, ko noben zgodovinski klicni znak z istega lokatorja ni v razdalji 2
Ločeno od CALL_SIMILAR CALL_BY_LOC in CALL_SIMILAR se pojavita kot ločeni težavi v rezultatu
Redundantno soobstajanje CALL_BY_LOC se sproži tudi, ko se kandidati prekrivajo s CALL_SIMILAR — oba signala se prikažeta kot potrjevalni dokaz

adif-merge.test.js — 112 testov · 21 skupin

Pokriva čisto logiko adif-merge.html: razčlenjevanje ADIF, deduplikacijo, normalizacijo polj, pomožnike za izvoz, XSS ubežanje, ubežanje CSV, popolnost i18n ključev in regresijske teste za popravke iz code reviewa.

Kako testi delujejo

adif-merge.html se izvede znotraj konteksta node:vm z enakim nadomestkom DOM na osnovi Proxy kot ostala HTML orodja. Modularni let vezani niso lastnosti ctx; ti testni pomočniki se vbrizgajo prek drugega klica vm.runInContext:

Lokalni pomočnik adif() izračuna :dolžino iz dejanske vrednosti niza vsakega polja, da fiksture testov niso krhke pri napakah v dolžini.

Skupine testov

1 · parseADIF — basic extraction (9 testov)

2 · parseADIF — date/time normalization (7 testov)

3 · parseADIF — multi-record / edge cases (9 testov)

4 · parseADIF — fields dict kept in sync (4 testi)

Normalizacija piše nazaj v q.fields, tako da je ADIF izvoz brez izgub:

5 · updateKey (3 testi)

6 · recomputeDupes (7 testov)

7 · parseADIF dedup key uniqueness (4 testi)

Integracija — ključi se pravilno prenesejo skozi parse + updateKey:

8 · adifField (7 testov)

9 · htmlEsc (9 testov)

10 · csvEsc (7 testov)

11 · modeBadge (13 testov)

12 · buildFilename (6 testov)

13 · ADIF export — field preservation (2 testa)

14 · I18N (4 testi)

15 · parseADIF — real-world fixtures (4 testi)

16 · parseADIF — missing optional fields (5 testov)

Regresija — razčlenjevalnik se ne sme zrušiti, ko manjkajo neobvezna polja:

17 · parseADIF — no submode property on QSO object (2 testa)

Regresija — SUBMODE je bila mrtva lastnost, odstranjena iz objekta QSO med code reviewom:

18 · adifField — export consistency (3 testi)

19 · updateKey — empty band handling (2 testa)

Dokumentira vedenje pri odsotnem band — brez zrušitve, ustvari CALL||MODE|DATE|TIME; dva takšna QSO z enakimi ostalimi polji si delita ključ (bosta deduplicirani).

20 · I18N — errBand key (3 testi)

Regresija — prevajalski ključ errBand dodan med code reviewom:

21 · parseADIF — re-merge safety (APP_ADIFMERGE_SRC) (2 testa)

Regresija — ponovni merge predhodno merganega ADIF ne sme podvojiti oznake provenienc:


Testi CLI orodja — adif-qrz-filter.test.js

Ločena testna zbirka pokriva Node.js CLI orodje. Tudi ta uporablja node:test brez zunanjih odvisnosti.

Testov: 48 v 4 skupinah

Zaganjanje

node --test adif-qrz-filter.test.js
node --test --test-reporter=spec adif-qrz-filter.test.js

Skupine testov

# Skupina Testov Kaj se preverja
1 parseAdif 6 Razčlenjevanje ADIF: ekstrakcija glave, razdelitev zapisov, izvleček QSL_VIA, obravnava CRLF, preskočitev manjkajočega CALL
2 extractField 8 Generična ekstrakcija <TAG:dolžina>vrednost za CALL, QSL_VIA, neobčutljivost na velikost črk, obrezovanje, pretvorba v velike črke, ADIF type specifier (<TAG:len:TYPE>)
3 usesQslBuro 31 Fuzzy logika: 12 pozitivnih primerov (buro/bureau + evropske črkovalice: buero/büro/buerau/boureau/burea/buiro; “Direct or Bureau” pravilno vrne true), 16 negativnih primerov (no/direct only/only via LoTW/eQSL only/”QSL via KLICNI_ZNAK”), 3 robni primeri (null/prazno)
4 cache 3 Krog shranjevanja/nalaganja JSON predpomnilnika, čiščenje po 7 dneh, obravnava manjkajoče datoteke

Kako testi delujejo

CLI orodje se izvede znotraj konteksta node:vm, ki nadomesti fs, https, process in console. Čiste funkcije (parseAdif, extractField, usesQslBuro, loadCache, saveCache) se izvlečejo in testirajo neposredno.

Opomba o deepStrictEqual: Tako kot pri testih edi2adif.html v vm kontekstu lahko assert.deepStrictEqual na vm-ustvarjenih objektih ne uspe, čeprav so lastnosti identične. Testi predpomnilnika zato uporabljajo assert.equal na posameznih lastnostih ali Object.keys().length za preverjanje praznih objektov.


vhf-logger/vhf-logger.test.js — 191 testov · 17 skupin

Pokriva čisto logiko vhf-logger/vhf-logger.html: normalizacijo klicnih znakov, mapiranje pasov, geo pomožnike, zaznavanje duplikatov, preračun duplikatov, gradnjo EDI, crosscheck poizvedbe, razčlenjevanje uvoza EDI, generiranje ZIP, barve pasov, stanje ročnega časa in validacijo backup/obnovi.

Kako testi delujejo

vhf-logger/vhf-logger.html se izvede znotraj konteksta node:vm z enakim nadomestkom DOM na osnovi Proxy kot edi-crosscheck.html. Ker modularni let vezani niso lastnosti ctx, se pomožne funkcije vbrizgajo prek drugega klica vm.runInContext. Ctx izrecno prejme TextEncoder, TextDecoder, Uint8Array, DataView in ArrayBuffer za pravilno delovanje makeZip:

Skupine testov

1 · baseCall (10 testov)

Preverja odstranjevanje pripon, ki se uporablja pri zaznavanju duplikatov in crosscheck poizvedbah.

2 · normBand (10 testov)

Preverja tabelo za mapiranje pasov.

3 · locToLatLon (7 testov)

Preverja pretvorbo Maidenhead lokatorja → zemljepisna širina/dolžina.

4 · haversine (4 testi)

Preverja izračun razdalje po velikem krogu.

5 · calcBearing (5 testov)

Preverja izračun smeri po velikem krogu.

6 · levenshtein (7 testov)

Preverja funkcijo Levenshteinove razdalje z zgodnjim izhodom pri maxDist=2.

7 · isDupe (7 testov)

Preverja zaznavanje duplikatov z normalizacijo baseCall() in parametrom excludeId.

8 · recalcDupes (4 testi)

Preverja popolni preračun zastavic duplikatov v seji.

9 · buildEdi (57 testov)

Preverja izhodni format REG1TEST EDI v1.

10 · lookupCall (6 testov)

Preverja crosscheck poizvedbo v uteženi+raw baseline bazi.

11 · sessionEdit (10 testov)

Preverja stanje in i18n pokritost za funkcijo urejanja seje.

16 · backup (32 testov)

Preverja strukturno validacijo validateBackup() in i18n nize za funkcijo backup/obnovi.

17 · I18N (3 testi)

Preverja simetričnost i18n ključev med SL in EN prevodi.


adif-stats.test.js — 133 testov · 21 skupin

Pokriva čisto logiko adif-stats.html: iskanje DXCC predpon, normalizacijo pasu/načina, pretvorbo lokatorjev, izračun QRB, razčlenjevanje ADIF, agregacijo statistik, logiko filtrov, formatiranje datumov/mesecev, XSS ubežanje, pomočnike SVG grafikonov in popolnost i18n ključev.

Kako testi delujejo

adif-stats.html se izvede znotraj konteksta node:vm z enakim nadomestkom DOM kot ostala HTML orodja. Izvleče se samo blok <script>; minimalni nadomestek zagotavlja localStorage, document.getElementById, URL, Blob, setTimeout in console.

Čiste funkcije so dostopne neposredno kot lastnosti konteksta: lookupCall, normBand, normMode, locToLatLon, haversine, parseADIF, computeStats, fmtDate, fmtMonth, htmlEsc, svgHBar, svgVBar, t.

Pomočnik adif() gradi minimalne ADIF fiksture z izračunom dolžin <TAG:dolžina>vrednost.

Skupine testov

1 · lookupCall (17 testov)

Preverja iskanje DXCC entitete po predponi klicnega znaka v vgrajeni bazi PREFIX_DB.

2 · normBand (5 testov)

3 · normMode (5 testov)

4 · locToLatLon (5 testov)

5 · haversine (5 testov)

6 · parseADIF — basic extraction (9 testov)

7 · parseADIF — date/time/QRB (8 testov)

8 · parseADIF — country/cont (3 testi)

9 · computeStats — overview (7 testov)

10 · computeStats — aggregates (9 testov)

11 · applyFilters — date filter (6 testov)

Replicira logiko filtriranja datumskega obsega v izolaciji:

12 · fmtDate (4 testi)

13 · fmtMonth (3 testi)

14 · htmlEsc (7 testov)

15 · svgHBar (6 testov)

16 · svgVBar (6 testov)

17 · I18N (8 testov)

18 · computeStats — byDay (3 testi)

19 · computeStats — byBandHour (4 testi)

20 · computeStats — byDxcc / byBandDxcc (5 testov)

21 · computeStats — qrbBuckets (8 testov)


adif2cab.test.js — 191 testov · 31 skupin

Pokriva čisto logiko adif2cab.html: preslikavo načinov Cabrillo, privzete RST, pretvorbo frekvence, razčlenjevanje ADIF, ekstrakcijo izmenjave per tekmovanje, formatiranje vrstic QSO, XSS ubežanje, pomočnike za značke, strukturo polja CONTESTS in celovitost i18n ključev.

Kako testi delujejo

adif2cab.html se izvede znotraj konteksta node:vm z enakim nadomestkom DOM na osnovi Proxy kot ostala HTML orodja. Izvleče se le blok <script>. Do čistih funkcij se dostopa neposredno kot do lastnosti konteksta.

Trije injicirani pomočniki omogočajo dostop do stanja modulne ravni (const/let):

Lokalni pomočnik adif() gradi testne nize ADIF s pravilnim kodiranjem <OZNAKA:dolžina>vrednost. Pomočnik makeQso() gradi minimalni objekt QSO s smiselnimi privzetimi vrednostmi.

Skupine testov

1 · modeToCAB — phone modes → PH (5 testov)

2 · modeToCAB — CW → CW (2 testa)

3 · modeToCAB — FM-based voice → FM (5 testov)

Cabrillo v3 specifikacija določa FM kot ločeno vrednost načina (ne PH).

4 · modeToCAB — RTTY → RY (2 testa)

Cabrillo v3 specifikacija določa RY za RTTY (ne splošnega DG).

5 · modeToCAB — digital modes → DG (8 testov)

6 · dfltRST (7 testov)

7 · freqToKHz — pretvorba polja FREQ (6 testov)

8 · freqToKHz — rezervna vrednost BAND_KHZ (10 testov)

9 · parseADIF — osnovna ekstrakcija (8 testov)

10 · parseADIF — normalizacija datuma/časa (7 testov)

11 · parseADIF — večzapisni / robni primeri (11 testov)

12 · extractExchR — CQ-WW-SSB (6 testov)

13 · extractExchR — CQ-WW-CW (3 testi)

14 · extractExchR — IARU-HF (6 testov)

15 · extractExchR — ARRL-DX (6 testov)

16 · extractExchR — GENERIC (5 testov)

17 · extractExchR — CQ-WW-RTTY (5 testov)

18 · extractExchR — IARU-VHF (7 testov)

19 · extractExchR — CQ-WPX-SSB (4 testi)

20 · extractExchR — CQ-WPX-CW (3 testi)

21 · formatCabDate (7 testov)

22 · buildQSOLine — struktura (12 testov)

23 · buildQSOLine — obdelava izmenjave (6 testov)

24 · buildQSOLine — privzeti RST (3 testi)

25 · buildQSOLine — izmenjava lokatorja IARU-VHF (4 testi)

26 · buildQSOLine — per-QSO serijska številka CQ WPX (3 testi)

27 · htmlEsc (9 testov)

28 · cabModeBadge (6 testov)

29 · modeBadge (9 testov)

30 · CONTESTS — struktura (11 testov)

31 · I18N (4 testi)


edi-validator.test.js — 109 testov · 22 skupin

Pokriva čisto logiko edi-validator.html: Maidenhead geo pomočnike in celotno funkcijo validate() za vse preverbe specifikacije in tipe težav.

Kako testi delujejo

edi-validator.html se izvede znotraj konteksta node:vm z enakim nadomestkom DOM na osnovi Proxy kot ostala HTML orodja. Funkcija validate(text) je dostopna neposredno kot lastnost konteksta in sprejme surovo besedilo EDI datoteke ter vrne {issues[], qsoCount}.

I18n objekt S (const S = {sl:{...}, en:{...}}) se izvozi prek drugega klica vm.runInContext('globalThis._S = S', ctx). V testni datoteki je definirana minimalna veljavna EDI fikstura in se uporablja kot osnova za mutacijske teste (vsak test mutira en vidik fiksture, da sproži določeno kodo težave).

Skupine testov

1 · locToLatLon (4 testi)

Preverja pretvorbo Maidenhead lokatorja → geografske koordinate.

2 · haversine (2 testa)

Preverja izračun razdalje po velikem krogu.

3 · validate — clean EDI (4 testi)

Osnovna preverba z dobro oblikovano EDI fikstura.

4 · validate — structure (6 testov)

Preverja obvezne razdelčne oznake in pravila za prazne vrstice.

5 · validate — non-spec keywords (6 testov)

Preverja ključne besede, ki niso definirane v specifikaciji REG1TEST v1.

6 · validate — header formats (8 testov)

Preverja sintakso polj glave.

7 · validate — ZRS mandatory fields (6 testov)

Preverja, da obvezna polja ZRS niso prazna.

8 · validate — QSO count (3 testi)

Preverja deklarirano vs. dejansko število QSO.

9 · validate — QSO field count (3 testi)

Preverja, da ima vsak zapis QSO natanko 15 polj, ločenih s podpičji.

10 · validate — QSO date (6 testov)

Preverja polje datuma QSO (YYMMDD pri stolpcu 0).

11 · validate — QSO time (4 testi)

Preverja polje časa QSO (HHMM pri stolpcu 1).

12 · validate — QSO mode (5 testov)

Preverja polje načina QSO (stolpec 3, veljavne vrednosti 0–9; način 0 = “nobeden od spodaj” po spec).

13 · validate — QSO dupe flag (6 testov)

Preverja polje zastavice duplikata QSO (stolpec 14, veljavne vrednosti prazno ali D).

14 · validate — QSO WWL format (4 testi)

Preverja polje lokatorja QSO (stolpec 9).

15 · validate — QRB deviation (5 testov)

Preverja deklarirani QRB (stolpec 10) glede na haversinom izračunano razdaljo.

16 · validate — line length (2 testa)

Preverja, da nobena vrstica ne presega 75 znakov.

17 · validate — non-ASCII characters (3 testi)

Preverja znake izven 7-bitnega ASCII obsega (spec §15.3.4).

18 · validate — duplicate keywords (4 testi)

Preverja, da se vsaka ključna beseda glave pojavi največ enkrat.

19 · validate — QSO date day (5 testov)

Preverja, da je vrednost dneva veljavna za dani mesec in leto (z upoštevanjem prestopnih let).

20 · validate — QSO date range (5 testov)

Preverja, da datumi QSO padejo znotraj obsega TDate (YYYYMMDD;YYYYMMDD) iz glave.

21 · validate — QSO RST format (13 testov)

Preverja polji RST (stolpec 4 = oddani RST, stolpec 6 = sprejeti RST) glede na pričakovano število cifer za način. Pravila: SSB/AM/FM (načini 1/4/5/6) → 2 cifri; CW/RTTY (načini 2/3/7) → 3 cifre; načini 0/8/9 → preverba preskočena. Prazen RST je vedno dovoljen.

22 · I18N (5 testov)

Preverja celovitost i18n ključev in razlikovanje prevodov.


Kaj ni testirano

Področje Razlog
handleFiles Zahteva asinhroni brskalniški FileReader; ni nadomestljiv v čistem vm kontekstu.
finishLoad / funkcije za posodobitev DOM Kličejo .style, .innerHTML itd. na resničnih vozliščih DOM; smiselno le v brskalniku.
Izvozne funkcije (exportADIF, exportDARC, exportCSV) Odvisne od stanja _all, potrditvenih polj DOM in Blob/URL.createObjectURL. Potrebni bi bili celostni brskalniški testi (npr. Playwright).
startEdit / restoreCell / commitEdit (DOM del) Upravljanje z dejanskimi vozlišči TD; testabilno le z jsdom ali Playwright. Logika validacije je testirana v skupini 8.
Razvrščanje (sortFiltered, setSort) Odvisno od stanja _filtered; testabilno le s celotno nastavitvijo stanja.