Test harness stops at the first thrown error and prints a stale check count
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 45/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript, nodejs
- 領域
- testing-qa
研究方向
The harness is hand-rolled eq/has/throws helpers in site/checks.test.mjs (around lines 52-75 and the summary near 817-822) and site/lib/lib.test.mjs (lines 16-38 and the summary near 1156-1162). Read those helpers and run npm test to see how one thrown exception stops the run. Done means a thrown error in one section no longer hides later results, the printed check count matches the real number of sections, and a single test can be selected by name, ideally via node:test's --test-name-pattern while keeping npm test as the entry point.
由索引模型根據 Issue 內容生成。
描述
Summary
Both test files hand-roll eq/has/throws. An exception inside any section (as opposed to a failed eq) kills the process before the failure report prints, hiding every later assertion.
Where
site/checks.test.mjs:52-75, 817-822site/lib/lib.test.mjs:16-38, 1156-1162
Details
checks.test.mjs prints a hard-coded "across 30 checks" while the file has 26 V-sections. lib.test.mjs is 1,163 lines in one scope and is the most-changed file in the repo.
Impact
One crash masks all other failures; no way to run a single test.
Suggested fix
Migrate section by section to the built-in node:test + node:assert (ships with Node 22, no dependency): per-test isolation, --test-name-pattern, real counts. Keep npm test as the entry point.
Acceptance criteria
- A thrown error in one test does not hide the others
-
npm testreports real counts - A single test can be run by name
Getting started
- Relevant files:
site/checks.test.mjs,site/lib/lib.test.mjs,package.json - How to run tests:
npm test(unit tests),npm run check(tests + validate + build). Node 22+, no dependencies. - Related docs:
site/README.md,CONTRIBUTING.md
Filed by repo-audit/full-audit at 982fcd9. Severity: low. Effort: M. audit-key: testing|site/lib/lib.test.mjs|harness
- 主要語言
- JavaScript
- 星號
- 58
- 分支
- 15
- 平均合併
- 1 天 14 小時
- 30 天內合併 PR
- 11
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/Free-Game-Dev-Assets 的其他 Issue
-
community marketing priority: low
難度 2/5 1-3 小時 新手友好度 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
維護者通常 1 天內回覆
-
documentation priority: medium
難度 2/5 1-3 小時 新手友好度 78/100
TMHSDigital/Free-Game-Dev-Assets#72 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1-3 小時 新手友好度 68/100
TMHSDigital/Free-Game-Dev-Assets#3 · 1 則留言 ·
維護者通常 1 天內回覆
-
[source] Avramania Free Collection可能已有人在做 @royalr 於 1 天前認領。 未關閉new-source
難度 1/5 1 小時以內 新手友好度 20/100
TMHSDigital/Free-Game-Dev-Assets#216 ·
維護者通常 1 天內回覆
-
enhancement priority: medium
難度 4/5 3-5 天 新手友好度 35/100
TMHSDigital/Free-Game-Dev-Assets#211 · 1 則留言 ·
維護者通常 1 天內回覆
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 73/100
hugomrdias/playwright-test#753 ·
維護者通常 1 天內回覆
-
bug good first issue
難度 2/5 1-3 小時 新手友好度 86/100
KonstantinStarovoytov/kitden#21 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
-
難度 2/5 1-3 小時 新手友好度 70/100
guybedford/es-module-shims#556 ·
-
app ernst:4-klein
難度 2/5 1-3 小時 新手友好度 75/100
NewspeedyNL/PidLane#683 ·
維護者通常 1 天內回覆