Skip to content

docs(web): add test guide rules from test cleanup - #45447

Merged
hyoban merged 1 commit into
mainfrom
docs/web-test-guide-cleanup-lessons
Nov 3, 2026
Merged

hyoban merged 1 commit into
mainfrom
docs/web-test-guide-cleanup-lessons

Conversation

@hyoban

@hyoban hyoban commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Extend the Web testing guide with six rules from recent test cleanups.

Provenance

Source PRs for each rule, taken from the cleanup-batch notes and the 2026-11-03 review of the merged cleanup PRs (#44812–#45383). APn refers to the cleanup anti-pattern catalog. Entries marked "(anti-example)" introduced the pattern that the rule now forbids. "?" marks a weaker or indirect link.

1. No tolerant assertions; use it.fails with an issue

2. Mocks must not reimplement the owner; no prop recorders or manually invoked captured callbacks

3. Timers and waitFor

4. Render-time initial state; non-empty state before reset or clear

5. Side-effect-free shared helpers and presets

6. Rewrite race and sync cases through real entry points before deleting them

Scope: 59 test(web) cleanup PRs (#44243–#45440), plus the review follow-up notes. The AP23/AP24/AP25 "review traps" came from an off-GitHub review on 2026-10-21; none of these PRs has GitHub review comments.

@github-actions github-actions Bot added size:S This PR changes 10-29 lines, ignoring generated files. web This relates to changes on the web. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Nov 3, 2026
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.80%. Comparing base (fbc33ca) to head (d35aab3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #45447   +/-   ##
=======================================
  Coverage   89.80%   89.80%           
=======================================
  Files        6240     6240           
  Lines      390960   390958    -2     
  Branches    79180    79177    -3     
=======================================
  Hits       351114   351114           
+ Misses      33751    33749    -2     
  Partials     6095     6095           
Flag Coverage Δ
dify-ui 92.54% <ø> (ø)
web 89.82% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 3, 2026
@hyoban
hyoban marked this pull request as ready for review November 3, 2026 09:42
@hyoban
hyoban requested a review from iamjoel as a code owner November 3, 2026 09:42
@hyoban
hyoban added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 8913401 Nov 3, 2026
61 checks passed
@hyoban
hyoban deleted the docs/web-test-guide-cleanup-lessons branch November 3, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants