openElement testing should protect framework contracts: route scanning, DSD output, island metadata, middleware scope, SSG post-processing, and package boundaries.
Application code can use Deno's built-in test runner. Start with unit tests for pure logic and API handlers, then add build smoke tests for critical routes.
A static-first framework needs at least one test that builds the site and verifies the generated HTML. This catches route scanning, SSR, client island, and SSG integration issues.
deno test --allow-read --allow-write --allow-env --allow-net --allow-runUse browser tests when behavior depends on Custom Element upgrade, IntersectionObserver, idle loading, service worker, or real DOM semantics.
openElement includes Playwright end-to-end tests that verify SSG output in real browsers. They confirm DSD is correctly parsed, Custom Elements upgrade, and island strategies work as expected.