@vielzeug/assay
v2.1.0
Published
Framework-agnostic DOM testing primitives — scoped queries, event dispatch, and async waiting
Readme
@vielzeug/assay
Framework-agnostic DOM testing primitives — scoped queries, synchronous event dispatchers, and async wait helpers, with zero dependency on any particular UI library.
Package: @vielzeug/assay · Category: Testing
Key exports: within, fireClick, fireInput, fireKeyDown, waitUntil, retry, waitForEvent, AssayError, AssayQueryError, AssayTimeoutError
When to use: Writing DOM-level tests for any custom-element or vanilla-DOM code — scoped element queries, low-level synchronous event dispatch, and deterministic async waiting — without pulling in a full testing-library dependency or coupling to a specific component framework.
Related: @vielzeug/ore · @vielzeug/refine
@vielzeug/assay is part of Vielzeug and ships as a zero-dependency TypeScript package with ESM+CJS output.
Installation
pnpm add -D @vielzeug/assay
npm install -D @vielzeug/assay
yarn add -D @vielzeug/assayQuick Start
import { fireClick, waitUntil, within } from '@vielzeug/assay';
const panel = document.querySelector('.panel')!;
const view = within(panel);
fireClick(view.get('button.submit'));
await waitUntil(() => view.queryByText('Saved') !== null);Documentation
License
MIT © Helmuth Saatkamp — part of the Vielzeug monorepo.
