New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-extended

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-extended

Additional Jest matchers

4.0.2
latest
Source
npm
Version published
Weekly downloads
1.7M
-5.57%
Maintainers
2
Weekly downloads
 
Created

What is jest-extended?

jest-extended is a set of additional matchers for Jest, a popular JavaScript testing framework. It extends Jest's built-in matchers with a variety of new ones, making it easier to write more expressive and comprehensive tests.

What are jest-extended's main functionalities?

Array Matchers

Checks if the value is an array.

expect([1, 2, 3]).toBeArray();

Object Matchers

Checks if the object contains the specified key.

expect({ a: 1 }).toContainKey('a');

String Matchers

Checks if the string starts with the given substring.

expect('hello world').toStartWith('hello');

Number Matchers

Checks if the number is within the specified range.

expect(10).toBeWithin(5, 15);

Date Matchers

Checks if the date is after the specified date.

expect(new Date('2023-01-01')).toBeAfter(new Date('2022-12-31'));

Other packages similar to jest-extended

Keywords

jest

FAQs

Package last updated on 10 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts