Examples

Copy the boring parts.

The framework does not ship a test stack. If you want tests, add the smallest thing that proves the behavior you care about.

HTTP smoke

curl -f http://127.0.0.1:8787/
curl -f http://127.0.0.1:8787/docs \
  -H "x-fragment: true"

Web Test Runner component test

npm i -D @web/test-runner @open-wc/testing

wtr test/**/*.test.js --node-resolve

Shadow DOM assertion

import { expect, fixture, html } from "@open-wc/testing";
import "../public/app/components/app-counter.js";

const el = await fixture(html`<app-counter></app-counter>`);
el.shadowRoot.querySelector("button").click();
expect(el.count).to.equal(1);

Build escape hatch

# only if you need TypeScript or npm browser deps
npx esbuild public/app/client.js \
  --bundle --format=esm --outfile=public/app.bundle.js