Huge News!Announcing our $40M Series B led by Abstract Ventures.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
  • Socket score

Version published
Maintainers
2
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc