Skip to content

test: runtime module coverage (#328)#371

Merged
SisyphusZheng merged 1 commit into
devfrom
fix/328-runtime-module-tests
Jul 9, 2026
Merged

test: runtime module coverage (#328)#371
SisyphusZheng merged 1 commit into
devfrom
fix/328-runtime-module-tests

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

Summary

Adds unit-test coverage for the runtime modules flagged in #328 as previously
untested pure/adapter surfaces.

  • core: event-marker (id/context/type parsing/serialize), csr barrel
    re-export smoke test, dsd-hydration (root attach/reuse, event hydrate
    bind/abort), render-dsd-stream (metrics collector lifecycle).
  • element: open-element-render (light/shadow adapters, error fallback),
    open-element-hydration (early-return + reset/hydrate) using structural
    FakeScope/FakeElement stand-ins (matching OpenElementLike).
  • ssg: postprocess (insertAfterHead, buildIslandChunkMap, injectClientScript,
    injectCspMeta escaping, injectDsdPolyfill, injectViewTransitionMeta,
    injectSpeculationRules, buildSpeculationRulesJson explicit + two-tier
    heuristic), route-scanner-fs (safeReadFile/safeReadDir/safeStat success +
    missing branches).

ssg-dynamic remains covered by the existing ssg-render suite, so the full
#328 module list is now covered.

Test plan

  • deno test on all 8 new files: 51 passed.
  • deno lint + deno fmt --check clean on all 8.
  • No DOM shim introduced; customElements-gated paths untouched.

Closes #328

Cover the previously-untested pure/adapter surfaces of the runtime:
- core: event-marker, csr barrel, dsd-hydration, render-dsd-stream
- element: open-element-render (light/shadow adapters), open-element-hydration
- ssg: postprocess (inject*/build* helpers), route-scanner-fs (safe* IO)

Uses structural FakeScope/FakeElement stand-ins so control-flow paths that
do not require a real DOM are pinned without pulling in a DOM shim.
ssg-dynamic remains covered by the existing ssg-render suite.

Co-Authored-By: Senior Developer <dev@openelement.local>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@SisyphusZheng SisyphusZheng merged commit 41f540e into dev Jul 9, 2026
4 of 5 checks passed
@SisyphusZheng SisyphusZheng deleted the fix/328-runtime-module-tests branch July 9, 2026 08:55
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