test: add browser-based unit tests for helpers, i18n, router

This commit is contained in:
2026-02-05 15:30:58 +01:00
parent bd7a259d72
commit 0b0185deb1
7 changed files with 658 additions and 1 deletions

View File

@@ -29,6 +29,9 @@ python3 -m http.server 8080
# Oder mit Live-Reload
npx live-server
# Tests ausführen (im Browser)
# Server starten, dann http://localhost:8080/tests/ öffnen
# Git Push (Token in URL)
git push origin master
```
@@ -54,7 +57,6 @@ js/
│ ├── categories.js # Kategorien Service (Baum, Übersetzungen)
│ ├── locations.js # Standorte Service (Geo-Suche)
│ ├── conversations.js # Zero-Knowledge Chat (E2E verschlüsselt)
│ ├── chat.js # LocalStorage Chat (Legacy/Mock)
│ ├── crypto.js # NaCl Encryption
│ ├── currency.js # XMR/Fiat Umrechnung
│ └── pow-captcha.js # Proof-of-Work Captcha (Challenge/Verify)
@@ -81,6 +83,13 @@ css/
assets/
└── fonts/ # Self-hosted Fonts (Inter, Space Grotesk)
tests/
├── index.html # Test-Runner UI (im Browser öffnen)
├── test-runner.js # Minimaler Test-Framework
├── helpers.test.js # Unit Tests für helpers.js
├── i18n.test.js # Unit Tests für i18n.js
└── router.test.js # Unit Tests für router.js
locales/
├── de.json # Deutsch (Fallback)
├── en.json