From 6256c48c05c8e27b18938955342126a50e67fca4 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Mon, 20 Jul 2026 15:01:45 +0300 Subject: [PATCH] =?UTF-8?q?docs(web-test):=20=D0=B2=20regress.md=20=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=B2=D0=B8=D1=82=D1=8C=20=D0=BF=D0=BE=D0=B2?= =?UTF-8?q?=D0=B5=D0=B4=D0=B5=D0=BD=D0=B8=D0=B5,=20=D1=83=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=BC=D0=B5=D1=85=D0=B0=D0=BD=D0=B8=D0=BA?= =?UTF-8?q?=D1=83=20=D1=80=D0=B5=D0=B7=D0=BE=D0=BB=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Инструкция навыка описывает использование: конфиг и хуки берутся из корня сьюта при любом переданном пути, разные сьюты в одном прогоне отвергаются. Маркеры подъёма и ограничители (.git / .v8-project.json / cwd) — контракт реализации, их место в спеке; читатель инструкции о них не спросит. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/skills/web-test/regress.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude/skills/web-test/regress.md b/.claude/skills/web-test/regress.md index c0cc8abe..e72f000c 100644 --- a/.claude/skills/web-test/regress.md +++ b/.claude/skills/web-test/regress.md @@ -10,7 +10,7 @@ node $RUN test ... [flags] Positional args are test paths (files and/or dirs, multiple allowed). URL is NOT positional — it comes from `webtest.config.mjs`; override with `--url=`. -`webtest.config.mjs` and `_hooks.mjs` are looked up by walking UP from the given path to the nearest directory holding either of them — the suite root. So `test tests/myapp/sales/` and `test tests/myapp/sales/01-order.test.mjs` work without `--url=`, taking the config and the hooks of `tests/myapp/`. The climb stops at a directory with `.git` / `.v8-project.json`, otherwise at the working directory. Paths from different suites in one run are refused — their config and hooks would be ambiguous. +`webtest.config.mjs` and `_hooks.mjs` always come from the suite root, whatever path you pass: `test tests/myapp/sales/` and `test tests/myapp/sales/01-order.test.mjs` both run under the config and hooks of `tests/myapp/`, no `--url=` needed. Paths from two different suites in one run are refused — pass one suite and narrow with `--grep=` / `--tags=`. Tests live next to the project they cover (not inside the skill). Convention: `tests/` at the project root, with `_hooks.mjs` and `webtest.config.mjs` at the suite root. Tests are ES modules with `*.test.mjs` suffix. @@ -71,7 +71,7 @@ tests// 01-end-to-end.test.mjs # multi-user ``` -Per-folder `_hooks.mjs` / `webtest.config.mjs` inside the application subfolder are NOT supported — only the application-root copies are loaded, whichever subfolder you point the runner at. (A nested folder that DOES carry its own `webtest.config.mjs` is not a sub-suite — it becomes a separate suite root, and its parent's hooks no longer apply.) +Per-folder `_hooks.mjs` / `webtest.config.mjs` inside the application subfolder are NOT supported — only the application-root copies are loaded, whichever subfolder you point the runner at. ## Test file anatomy