nanoviews-testing

Installation
SKILL.md

Nanoviews Testing

@nanoviews/testing-library mounts a view into the document and re-exports the whole @testing-library/dom API (screen, within, fireEvent, waitFor, findBy*, prettyDOM). Signal writes reach the DOM synchronously, so most tests need no await. Describe chains and it should titles follow the unit-tests skill; how views are written is the nanoviews skill.

Setup

// vite.config.ts
import { defineConfig } from 'vitest/config'

export default defineConfig({ test: { environment: 'happy-dom', setupFiles: ['./test/setup.ts'] } })
// test/setup.ts
import '@nanoviews/testing-library/vitest'   // registers afterEach(cleanup) with Vitest's afterEach
import '@testing-library/jest-dom/vitest'    // optional matchers
Installs
8
First Seen
Sep 10, 2026