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. Treat yarn lint and yarn build as 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 testSequencertest/lib/jest/test.sequencer.js. That sequencer:

  • declares an empty CORE_TEST_ORDER array, and
  • prepareTests filters with order.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:

  1. Dropped a scratch test into the tree → still zero tests.
  2. 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/jest is not installed or declared.
  • tsconfig.json include covers only server/**, 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:

  1. Write tests under test/tests/.
  2. Populate CORE_TEST_ORDER in test/lib/jest/test.sequencer.js, or drop the custom sequencer / change prepareTests to pass through unlisted files instead of filtering them out.
  3. Add @types/jest and bring test/** into tsconfig.json include (plus types: ["jest"]) if any test is .ts.
  4. Decide whether the jest script should carry --passWithNoTests itself, 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_oss has the same disease, a different mechanism

Do not read “portal_css is the broken one” into this. In vuer_oss, test/tests/unit/translations.test.js also registers zero tests — it misuses it.each, so the callback is never invoked — and two further suites flake non-deterministically in CI. Both repos’ test gates are weaker than their green suggests: vuer-oss-unit-tests-green-is-weak-evidence.