- docs/ide/: 49 user pages grouped in toc.json (editing, languages, run / test / debug, Git, web sites and Symfony, databases, Docker and SSH, games, AI, team, settings); pages of features still being built are "coming soon" stubs with a TODO list; 15 pages translated into French; docs/ide.md and docs/ide.fr.md link to them. - The Doc button at the top right of the IDE, Help > Documentation, Search Everywhere "Documentation" and a "?" in each tool window's header open the Doc browser (ide/ui/js/docs-browser.js): table of contents, rendered pages (pictures, code, tables, links between pages and to headings), full-text search, back / forward, the IDE's language with English as the fallback. - ide/src/Docs/DocsLibrary.php (docs.index, docs.image): reads only the documentation folder (strict names, real path checked); the packaged copy ui/docs first, else the repository's docs/ide. - Packaging: tools/stage-game.sh copies docs/ide into the exported IDE (its *.md exclusion would drop them), overlay-build.php puts them in code updates, bin/jumphp ide syncs them. - Tests: docs-model.test.mjs (TOC, links, anchors, pictures, search; every page and picture of docs/ide exists), DocsLibraryTest (path traversal refused), the i18n test covers the new texts in 14 languages. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JkYTqsvYu6AYr9yQ3Q4Nt6
34 lines
1.5 KiB
Markdown
34 lines
1.5 KiB
Markdown
# Tests
|
|
|
|
The **Tests** window (bottom) shows the project's tests as a tree, found by reading the files, without running anything: PHPUnit
|
|
(suites, files, classes, methods, data sets), Pest, JumPHP game tests, and JavaScript tests (`*.test.mjs` with `node --test`, Vitest,
|
|
Jest).
|
|
|
|

|
|
|
|
## Run
|
|
|
|
- **Run All**, a suite, a file, a class, a method, a data set, **Rerun the Failed Tests**.
|
|
- The test at the cursor: `Ctrl+Shift+F10`, or the ▶ in the editor's gutter (coloured by the last result).
|
|
- Results come live: the tree turns green or red as tests end.
|
|
- A failure shows **expected / actual side by side**, the stack's links and what the test printed.
|
|
- A **game test** shows its filmed frames (a picture every 4 frames) and its last frame.
|
|
- The clock button reruns the last tests whenever a file is saved.
|
|
- Filters: failed only, slow (≥ 500 ms). The summary bar: passed / failed / skipped, time, coverage, the last 10 runs.
|
|
|
|
## How they run
|
|
|
|
| Project | Command |
|
|
|---|---|
|
|
| JumPHP game / app, `engine`, `ide` | `bin/jumphp test <id> --phpunit` (Docker) |
|
|
| web site / any PHP project | PHPUnit in the site's PHP container, or the computer's PHP (runner *Local*) |
|
|
| JavaScript | `node --test`, `npx vitest run`, `npx jest` (the computer's node, else Docker) |
|
|
|
|
## Coverage
|
|
|
|
The ✓ button (**Run All Tests with Coverage**): Xdebug in coverage mode; green / red bars in the editor's gutter and a percentage per
|
|
file in the tree.
|
|
|
|
## Limits
|
|
|
|
Pest's names are guessed from the code; JavaScript has no coverage; PHPUnit 12+ ignores `@test`.
|