# Frontend unit tests Regression net for the highest-risk pure/near-pure logic in `js/app.js`: crypto round-trip, KDF/verifier derivation, CSV import parsing, and the sync-merge / tombstone-resurrection arbitration. Addresses `CODE_AUDIT.md` §3.2 (aucun test automatisé). ## Running ``` npm test # or directly: node --test "js/tests/**/*.test.js" ``` Zero dependencies — uses the Node built-in test runner (`node:test`) and `webcrypto`. Requires Node ≥ 18 (developed on v24). Runs in ~1.7 s. ## How it works — `harness.js` The frontend is a large browser script with **no module exports** and one top-level side effect (a `DOMContentLoaded` listener). It's being split into ordered classic-script files (§3.1); the harness **concatenates** the app parts in load order (`APP_PARTS` = `app.crypto.js` + `app.js`) into one source — node:vm doesn't share top-level `const`/`let` across separate `runInContext` calls the way the browser shares them across `