Repository

KensioSoftware/smartass

Smartass

TypeScript-first test assertion functions with precise type narrowing via assertion signatures.

2stars

Open github.com

KensioSoftware/smartass

Smartass

TypeScript-first test assertion library with assertion signatures for precise type narrowing, composable matchers, and standalone assertion functions.

Visit project

Show me a random project

First shared
Jun 14, 2026
HN activity
30

Show HN@xiuyuanJun 14, 2026

Show HN: Smartass – TypeScript test assertions with type-narrowing signatures

I thought it was a shame that the expect() fluent interface in Jest and Vitest is unable to make use of a TypeScript feature called assertion signatures. Assertion signatures seem like a natural fit for test assertions, because they let you align real run-time validation with compile-time type information. I wanted to be able to do both of those things in one go in tests, so I put together this small library of test assertion functions and composable matcher functions with assertion signatures.

Community

Hacker News discussion

Loading the thread…