Manifest-driven smoke test: for every custom element found in the sources, banira compiles its module, mounts it in JSDOM, and asserts the tag registers and upgrades.
| Argument | Description |
|---|---|
<files...> | Component source files to test. |
| Option | Description |
|---|---|
--reflection | Also round-trip each observed attribute ↔ its backing property and warn on either direction that doesn’t reflect. |
--slots | Also inject sample slotted content and warn on declared @slots with no matching |
--size | Also report each element’s emitted size (raw + gzip) and a rough first-render time. |
--budget <file> | Compare size/render time against a baseline JSON and exit 1 on regression (implies --size). |
--update-budget | With --budget: write the current measurement as the baseline instead of comparing. |
--threshold <percent> | Allowed growth over the baseline. (default: 10) |
$ banira test src/*.ts$ banira test src/*.ts --reflection --slots$ banira test src/*.ts --budget budget.jsonCatches the most common breakages — a component that throws on construction, or never calls
customElements.define — with no per-component test code. Exits non-zero if any element fails, so it
drops straight into CI. --reflection and --slots add advisory warnings (they don’t fail
the command), since not every attribute is meant to reflect.
The size is the emitted JavaScript of the element’s module and its local import graph (lowered CSS/HTML included,
bare npm imports excluded); the render time is the median construct-and-connect time of a fresh instance in JSDOM —
rough, so render regressions under 1 ms are ignored. Create or refresh the baseline with
--update-budget.