mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
fix(client): lint:skips counts skips with any title and Playwright's fixme
A skip only counted when its first argument was a string or template literal; anything else was taken for a Playwright run-time condition. So it.skip(name, fn) in a table loop, describe.skip(TITLE, fn) or test.skip(true, 'why') switched tests off without the baseline noticing, and test.fixme was not matched at all. The condition form is now recognised in Playwright specs under e2e/ only, and even there a call counts when it declares a test (a body as second argument), is called bare inside a test or group, or has the literal true as its condition. Under vitest every .skip counts. fixme is a skip. Nothing in the tree uses these shapes today, so the baseline stays at 35.
This commit is contained in:
@@ -7,9 +7,11 @@
|
||||
* switched off and then forgotten (JourneyDetailPage.test.tsx has carried 35
|
||||
* skipped blocks since April); the files that hold some are listed in
|
||||
* scripts/skip-baseline.json with their count, and a file may hold no more.
|
||||
* A skip that decides at run time (skipIf, runIf, Playwright's
|
||||
* test.skip(condition, 'why')) is not counted. Covers the vitest tests under
|
||||
* src/ and tests/ and the Playwright specs under e2e/.
|
||||
* Playwright's test.fixme counts as a skip. Only a skip that decides at run
|
||||
* time is left out: skipIf, runIf, and in a Playwright spec
|
||||
* test.skip(condition, 'why') unless the condition is the literal true.
|
||||
* Covers the vitest tests under src/ and tests/ and the Playwright specs
|
||||
* under e2e/.
|
||||
*
|
||||
* npm run lint:skips check against the baseline (CI)
|
||||
* npm run lint:skips -- --update lower the baseline to what the files hold now;
|
||||
|
||||
Reference in New Issue
Block a user