sokko-g/tests
Shinuwa 17e5cd5e63 Put trading and giving up front and suggest the players who need each card
The Échanges et dons page now opens on two illustrated tiles, centred and
360 px wide at most: trade (L'Échange Écarlate) and give (the Dawn card,
renamed Le Don de l'Aube with a gift story). Each counts the cards missing
on either side and previews a few. In the composer, the most useful players
come first in the list and as suggested chips, and missing duplicates lead
with a badge; nothing is filtered, so owned duplicates stay tradeable for
Awakenings. GET /api/cards/traders adds `wants`: which of the viewer's own
duplicates each player lacks, and nothing else of their collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:01:56 +01:00
..
fixtures Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
helpers Put trading and giving up front and suggest the players who need each card 2026-12-01 17:01:56 +01:00
AGENTS.md Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
aniimo-elements.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
aniimo.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
auto-backup.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
data-validation.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
deferred-module-data.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
deployment-workflow.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
file-headers.test.mjs Check in the tests that central files keep their full headers and that every tool has a compactor 2026-12-01 11:22:50 +01:00
finish-availability.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
function-docs.test.mjs Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
guide-checklist.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
holo-flares.test.mjs Group Sokko TCG's interface files by Guild quest and card rendering 2026-12-01 11:35:18 +01:00
library-copy.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-api.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-daily.test.mjs Group Sokko TCG's interface files by Guild quest and card rendering 2026-12-01 11:35:18 +01:00
nebula-cards-expedition-balance.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-expedition-service.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-expeditions.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-mirror.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
nebula-cards-team.test.mjs Group Sokko TCG's interface files by Guild quest and card rendering 2026-12-01 11:35:18 +01:00
nebula-cards.test.mjs Put trading and giving up front and suggest the players who need each card 2026-12-01 17:01:56 +01:00
persistence-queue.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
project-env.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
quota-refresh.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
react-lint.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
README.md Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
server-cache.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
server-robustness.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
static-app.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
static-games.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
static-styles.test.mjs Stop new code from skipping its JSDoc or SassDoc, and tell agents to fix old gaps as they go 2026-12-01 16:34:47 +01:00
static-toolboxes.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
table-evaluation.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
task-planner-quantities.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-alert-visibility.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-compactors.test.mjs Check in the tests that central files keep their full headers and that every tool has a compactor 2026-12-01 11:22:50 +01:00
toolbox-image-actions.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-import-validation.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-modules.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-share-crypto.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-share-quota.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-shares-api.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-shares-store.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00
toolbox-targets.test.mjs Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks 2026-12-01 09:42:13 +01:00

Tests Node

Tests lancés avec le lanceur intégré de Node (node --test), sans navigateur. Les parcours dans un vrai navigateur sont dans e2e/. Le choix entre les deux est expliqué dans docs/TEST_STRATEGY.md.

npm test                                  # tous les tests Node
node --test tests/nebula-cards.test.mjs   # un seul fichier
node --test --test-name-pattern="site content" tests/data-validation.test.mjs
npm run test:cards                        # seulement le TCG

Ce que couvrent les fichiers

Fichiers Sujet
data-validation.test.mjs + helpers/data-validation.mjs Contenu éditable : site.json, données de jeux, Librairie. Toute nouvelle clé de texte se déclare ici.
nebula-cards*.test.mjs Sokko TCG : règles pures, service avec une base SQLite en mémoire, API HTTP, Carte du jour, Expéditions et leur équilibrage, Équipe du jour, Miroir brisé
server-*.test.mjs, static-app.test.mjs, deployment-workflow.test.mjs, project-env.test.mjs Serveur Node (cache, robustesse), application construite, livraison, lecture du .env
toolbox-modules.test.mjs, static-toolboxes.test.mjs, persistence-queue.test.mjs, deferred-module-data.test.mjs, quota-refresh.test.mjs, auto-backup.test.mjs, library-copy.test.mjs Toolboxes : normalisation des outils, file d'écriture, médias différés, sauvegarde, copie depuis la Librairie
file-headers.test.mjs, function-docs.test.mjs, static-styles.test.mjs, react-lint.test.mjs, toolbox-compactors.test.mjs Règles d'architecture vérifiées sur les sources : en-têtes /** @file … */ du JS (rubriques des fichiers centraux et des gros fichiers), JSDoc des fonctions exportées (cliquet sur fixtures/undocumented-exports.json) et // Rôle : des feuilles Sass, blocs SassDoc /// des mixins et fonctions, compacteur de chaque outil, taille des feuilles Sass, chargement des styles du TCG, règles React
aniimo*.test.mjs, static-games.test.mjs, guide-checklist.test.mjs Guides de jeux
holo-flares.test.mjs, finish-availability.test.mjs Effets visuels des cartes

Les tests « statiques » lisent les fichiers sources pour protéger une règle d'architecture. Ils ne remplacent pas un parcours navigateur quand le risque porte sur une interaction ou un rendu.

Écrire un test

  • Commencer le fichier par un en-tête /** @file … */ (gabarit dans website/AGENTS.md).
  • Un test du TCG crée sa propre base en mémoire et passe now et random au service pour rester reproductible.
  • Un nouveau fichier de test du TCG s'ajoute aux listes lint:cards et test:cards de package.json.