Show HN: Runner-agnostic typed test fixtures inspired by Playwright
https://www.npmjs.com/package/fixtures-tsI really like the fixture model in Vitest and Playwright - typed, composable, dependency-based setup with automatic ordering and teardown.
That pattern is powerful, but it’s tightly coupled to those runners. I wanted the same model in bun:test and across projects using different test frameworks.
So I built a small runner-agnostic fixture system in TypeScript inspired by that approach.
It lets you:
- define fixtures with explicit dependencies
- request only what a test needs
- resolve setup order automatically
- deduplicate shared fixtures
- run cleanup in reverse order
- detect circular dependencies
It’s intentionally small and framework-agnostic.
I’d really appreciate feedback on the API design and whether this pattern makes sense outside Vitest/Playwright.