Socket
Socket
Sign inDemoInstall

@empathyco/x-jest-utils

Package Overview
Dependencies
Maintainers
5
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@empathyco/x-jest-utils

Jest extensions for easier testing


Version published
Weekly downloads
182
increased by18.18%
Maintainers
5
Weekly downloads
 
Created
Source

x-jest-utils

Jest extensions for easier testing.

How to install

# or pnpm or yarn
npm install @empathyco/x-jest-utils --save-dev

How to use

To register the extended matchers, just import the package in your tests. The recommended way to do so is using the setupFilesAfterEnv option from your Jest config file.

// File jest.config.js
module.exports = {
  setupFilesAfterEnv: ['./tests.setup.js'],
  testMatch: ['<rootDir>/**/*.spec.js']
};
// File tests.setup.js
import '@empathyco/x-jest-utils';

If you want to find out all the matchers, check the src/jest-utils.types.ts file.

Keywords

FAQs

Package last updated on 24 Nov 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