@empathyco/x-jest-utils
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i @empathyco/x-jest-utils

Weekly Downloads

240

Version

2.0.2

License

Apache-2.0

Unpacked Size

22.6 kB

Total Files

7

Last publish

Collaborators

  • roberd
  • guillermotti
  • javieri-empathy
  • ivantajes
  • empathy-support