Jest Date Matchers

JSON →
library 1.1.6 ·javascript
verified May 27, 2026

jest-date is a utility library providing custom Jest matchers specifically designed for comparing and asserting dates. It simplifies date-related tests by offering a declarative API, such as `toBeBefore`, `toBeSameDayAs`, and `toBeMonday`, eliminating the need for repetitive date manipulation logic in test assertions. The current stable version is 1.1.6, and while no explicit release cadence is stated, its versioning suggests incremental updates. A key differentiator is the helpful, descriptive failure messages it provides, indicating precise differences (e.g., '1 second after' or '3 months after') rather than generic assertion failures, making debugging significantly easier for developers. It leverages underlying date utility libraries, abstracting their complexity for focused testing scenarios.

total hits 16
actors 8 distinct systems
last hit 2d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany