Skip to content

Add integration coverage for foster-parented table siblings#123

Merged
kitsuyui merged 1 commit into
mainfrom
fix/foster-parenting-sibling-test
Jul 14, 2026
Merged

Add integration coverage for foster-parented table siblings#123
kitsuyui merged 1 commit into
mainfrom
fix/foster-parenting-sibling-test

Conversation

@kitsuyui

Copy link
Copy Markdown
Owner

Summary

  • add an integration helper that inspects element child sequences
  • cover malformed table content that triggers foster parenting before a table sibling
  • assert that existing comment, foster-parented text/element nodes, and trailing table siblings keep their expected order

Why

append_before_sibling rebuilds sibling lists around table foster-parenting boundaries. This adds a public-API regression test for the reachable path that is most likely to lose or reorder siblings during refactors.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo check
  • cargo test --all-targets --all-features

Exercise malformed table content so comment, text, and element siblings moved around a table stay observable after parsing.
@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (b206356) #123 (ebcb43d) +/-
Coverage 69.0% 81.3% +12.2%
Code to Test Ratio 1:0.1 1:0.2 +0.0
Test Execution Time 6s 5s -1s
Details
  |                     | main (b206356) | #123 (ebcb43d) |  +/-   |
  |---------------------|----------------|----------------|--------|
+ | Coverage            |          69.0% |          81.3% | +12.2% |
  |   Files             |              4 |              4 |      0 |
  |   Lines             |            605 |            605 |      0 |
+ |   Covered           |            418 |            492 |    +74 |
+ | Code to Test Ratio  |          1:0.1 |          1:0.2 |   +0.0 |
  |   Code              |            652 |            652 |      0 |
+ |   Test              |             71 |            134 |    +63 |
+ | Test Execution Time |             6s |             5s |    -1s |

Code coverage of files in pull request scope (68.9% → 81.4%)

Files Coverage +/- Status
src/handle.rs 52.3% +34.9% affected
src/lib.rs 84.8% +8.6% affected
src/util.rs 85.2% +26.4% affected

Reported by octocov

@kitsuyui
kitsuyui merged commit 430de19 into main Jul 14, 2026
6 checks passed
@kitsuyui
kitsuyui deleted the fix/foster-parenting-sibling-test branch July 14, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant