Untested reject branches in search, safe-fetch and schema-check, and no guide-page test
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with site/lib/lib.test.mjs and the named functions in site/lib/search.mjs, safe-fetch.mjs, schema-check.mjs, guide-page.mjs and guide-render.mjs. Run npm test to see the existing coverage, then add assertions for the listed reject, tie-break, rendering and text conversion cases. Done when those assertions pass and protect each acceptance criterion.
Written by the indexing model from the issue text.
Description
Summary
V8 block coverage shows a handful of reject and tie-break branches in otherwise well-tested modules never run, and the guide page renderer has no unit test at all.
Where
site/lib/search.mjs:100-101,:169-178site/lib/safe-fetch.mjs:66-67,:99-101site/lib/schema-check.mjs:30,:34,:47-49site/lib/guide-page.mjs:10-57site/lib/guide-render.mjs:209(plainText)
Details
The behaviour was checked by hand and is correct today; only the regression guards are missing.
Impact
A future edit could silently break these branches.
Suggested fix
Add the assertions below to site/lib/lib.test.mjs.
Acceptance criteria
-
passesFiltersrejects a perspective mismatch and a licence-family mismatch -
SORTS.licenseandSORTS.verifiedbreak ties by name -
isPrivateAddress:198.18.0.1,198.19.255.255,198.51.100.7,::ffff:198.18.0.1true;198.20.0.1false -
refusalFor("not a url")returns "not a valid URL" -
schemaErrorswith$ref: "http://x"or a missing#/defs/ythrows naming the ref - Guide page:
<&">in the title is escaped in<title>, breadcrumb and h1;modified: nullomitsdateModified; long first paragraph clipped to 160 chars in the description; notitleIdgives an h1 with no id; edit link is${repo}/blob/main/${path} -
plainTextstrips tags and decodes entities
Getting started
- Relevant files:
site/lib/lib.test.mjs - Run the tests:
npm test; the full local gate isnpm run check(Node 22+, no install step) - Related docs:
CONTRIBUTING.md,site/README.md
Filed by repo-audit/full-audit at 4adb944. Severity: low. Effort: S. audit-key: testing|site/lib/search.mjs|reject-branches
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 15
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TMHSDigital/Free-Game-Dev-Assets
-
enhancement good first issue priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TMHSDigital/Free-Game-Dev-Assets#272 ·
Maintainers usually reply within 1 day
-
documentation good first issue priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TMHSDigital/Free-Game-Dev-Assets#270 ·
Maintainers usually reply within 1 day
-
documentation priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TMHSDigital/Free-Game-Dev-Assets#269 ·
Maintainers usually reply within 1 day
-
good first issue priority: low tests
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TMHSDigital/Free-Game-Dev-Assets#267 ·
Maintainers usually reply within 1 day
-
priority: low tests
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TMHSDigital/Free-Game-Dev-Assets#265 ·
Maintainers usually reply within 1 day
All issues in TMHSDigital/Free-Game-Dev-Assets
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
guybedford/es-module-lexer#266 ·
-
bug documentation
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
apify/apify-docs#3206 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
anhnt256/cursor-swarm#21 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
zerohourzulu/irontrellis#16 ·