Skip to content

Challenge count in the README hero is not covered by the parity suite #302

Description

@kOaDT

Problem

tests/unit/challenge-parity.test.ts guards the challenge count in README.md and EDUCATORS.md, but 2 of the 4 places that state it slip through:

  • README.md:13 — the hero line, the first number a visitor reads: 36 challenges across <b>web, API, ...</b>. Neither guard regex matches it (no "CTF", no "chapters").
  • EDUCATORS.md:187.match() returns only the first hit, so only EDUCATORS.md:19 is actually asserted.

Adding the 37th challenge therefore passes CI with a stale "36" in the README headline.

Current guards

tests/unit/challenge-parity.test.ts:366 and :381

readme.match(/(\d+) CTF challenges across (\d+) chapters/); // → README.md:168 ✅
readme.match(/(\d+) chapters, (\d+) flags/);                // → README.md:186 ✅
educators.match(/all (\d+) challenges/);                    // → EDUCATORS.md:19 only

Fix

  • Add an assertion covering the README hero line.
  • Switch the EDUCATORS.md assertion to matchAll so every occurrence is checked.

⚠️ README.md:170 reads "8 tasks and 7 flags" about the TryHackMe room — that is not the challenge count. A blanket /(\d+) flags/ assertion will fail on it.

Acceptance

Commenting out one entry in prisma/flags.ts makes npm run test:unit fail and name both README.md:13 and EDUCATORS.md:187.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersimprovementFeature evolution, refactor, UI, UX, ...

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions