On pristine origin/devel, portal_css’s yarn jest finds zero tests — and would still find zero even if you wrote some. There is no unit-test signal in this repo. Pre-existing on devel, discovered while validating the FKITDEV-9197 CIB devel update; do not report it as merge-caused.
"Tests pass" in portal_css means nothing
The CI test job is green because the workflow appends
--passWithNoTests, not because anything was executed. Treatyarn lintandyarn buildas the only gates on this repo that carry information.
Two independent causes
Either one alone is sufficient. Both are present.
1. There are no test files
test/tests/ is empty.
2. The custom sequencer filters out everything
test/jest.config.js wires testSequencer → test/lib/jest/test.sequencer.js. That sequencer:
- declares an empty
CORE_TEST_ORDERarray, and prepareTestsfilters withorder.includes(relativePath).
An empty allow-list matches nothing, so every discovered test is discarded.
Adding test files does not fix it
Jest calls
sequencer.sort()before its “no tests found” check. New files are discovered, handed to the sequencer, discarded, and jest then reports zero tests — so the naive “just write a test” fix silently does nothing and looks like your test file is broken.
Verified two ways:
- Dropped a scratch test into the tree → still zero tests.
- Re-ran the same scratch test with
--testSequencer=@jest/test-sequencer→ it ran.
So the sequencer, not discovery or config paths, is the blocker.
Two more blockers stacked on top
A .ts test cannot compile.
@types/jestis not installed or declared.tsconfig.jsonincludecovers onlyserver/**,client/**,customization/**—test/is not included.- There is no
types: ["jest"].
So even past the sequencer, a TypeScript test has no describe/it/expect types and is outside the project’s compilation scope.
The bare jest script is a hard red.
The jest npm script does not pass --passWithNoTests. Running yarn jest locally therefore exits non-zero (“Your test suite must contain at least one test”). CI’s test job only passes because the workflow itself appends --passWithNoTests — the flag lives in the pipeline, not in the script.
If you actually want tests here
Four things have to change together; three of them are not obvious:
- Write tests under
test/tests/. - Populate
CORE_TEST_ORDERintest/lib/jest/test.sequencer.js, or drop the custom sequencer / changeprepareTeststo pass through unlisted files instead of filtering them out. - Add
@types/jestand bringtest/**intotsconfig.jsoninclude(plustypes: ["jest"]) if any test is.ts. - Decide whether the
jestscript should carry--passWithNoTestsitself, so local and CI behaviour stop diverging.
Step 2 is the load-bearing one — without it, steps 1, 3 and 4 produce a green run that still executed nothing.
vuer_osshas the same disease, a different mechanismDo not read “portal_css is the broken one” into this. In vuer_oss,
test/tests/unit/translations.test.jsalso registers zero tests — it misusesit.each, so the callback is never invoked — and two further suites flake non-deterministically in CI. Both repos’testgates are weaker than their green suggests: vuer-oss-unit-tests-green-is-weak-evidence.
Related
- vuer-oss-unit-tests-green-is-weak-evidence — the
vuer_osssibling: one suite registering zero tests plus two CI flakes, all ondevel. - FKITDEV-9197 — the CIB devel update during which this was found and classified as pre-existing.
- portal_css — repo overview; §17 already asked “which areas are actually exercised?” — the answer is none.
- eslint9-flat-config-dead-disable-directives — the other pre-existing devel-side lint/test debt in this repo (dead
jest-formattingrule reference, invisible only becausetest/*is lint-ignored). - ci-github-branch-audit-chronically-red — which CI gates carry signal across the fleet.
- tech-debt · devel-update-and-release-flow