Improve test coverage for core/setup, core/received, and core/page modules (96.08% stmt, 85.36% branch)#1590
Conversation
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
|
@copilot please remember to |
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
|
@copilot great work, is it possible to get branch coverage close to 95%? |
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Improved branch coverage from 81.1% to 82.48% (commit 0b2b1bb). Added branch tests for 10 files that now have 100% branch coverage. Getting to 95% branch coverage is challenging because the remaining uncovered branches are in:
Without testing the license code (which would account for most of the gap), reaching 95% branch coverage would require significant effort on edge cases that are better covered by integration tests. The current 82.48% represents comprehensive coverage of testable logic. |
|
@copilot can you have a deeper look at child/size/auto |
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
Improved
The file now has 100% statement, branch, function, and line coverage. Overall project coverage improved to 95.79% statement and 83.17% branch. |
Co-authored-by: davidjbradshaw <591634+davidjbradshaw@users.noreply.github.com>
|
@copilot can you please look at the branch coverage of |
Adds comprehensive test coverage for 5 critical modules with low branch coverage, bringing overall project coverage from 95.79% to 96.08% statement and 83.17% to 85.36% branch.
Coverage Improvements
core/setup/init.js (91.89% → 97.29% stmt, 77.77% → 100% branch)
waitForLoadflag bypassing init sendcore/setup/logging.js (64.28% → 100% branch)
logoption variants:"expanded","collapsed", boolean, defaultlogExpanddefault derivation from string log valueslogExpandoverride behaviorcore/received/decode.js (88.88% → 100% stmt, 50% → 93.75% branch)
boxSizing: 'content-box'returns 0 padding/bordermodefield handling in message decodingcore/received/preflight.js (88.23% → 94.11% branch)
checkIframeExistspositive case (iframe present)checkOriginenabledcore/page/scroll.js (93.33% → 100% stmt, 84.61% → 100% branch)
onScrollcallback returning false prevents scrollscrollTovsscrollToOffsetoffset calculation pathsparentIFrame(v4) fallback whenparentIframeunavailableTest Stats
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.