The Jest Extended Library
Explore how to extend Jest's expect function with the jest-extended library to add powerful, readable matchers for arrays, dates, promises, and more. Learn methods for integrating these matchers to improve clarity and expressiveness in your JavaScript tests.
We'll cover the following...
We'll cover the following...
Expanding our testing toolkit
In addition to the variety of matchers provided to us directly from Jest, there are a number of libraries that extend its functionality with additional matchers. One of the most common is the jest-extended jest-extended library, created and maintained by the Jest community. It includes TypeScript support and extends functionality for asserting upon the following:
- Arrays
- Booleans
- Dates