@moxy/jest-config-testing-library

6.1.0 • Public • Published

jest-config-testing-library

NPM version Downloads Dependency status Dev Dependency status

MOXY's Jest configuration enhancer for:

Installation

$ npm install --save-dev jest @moxy/jest-config-base @moxy/jest-config-testing-library

This package should be used in conjunction with @moxy/jest-config-base. There are two enhancers available:

withRTL

An enhancer for web projects tested with React Testing Library.

What's included?

  • Extended matchers: Make assertions easier and clearer by using jest-dom.

Usage

To use this enhancer, use the compose function that comes with this package. Keep in mind, the first item should always be the base configuration!

'use strict';

const { compose, baseConfig } = require('@moxy/jest-config-base');
const { withRTL } = require('@moxy/jest-config-testing-library');

module.exports = compose(
    baseConfig(),
    withRTL(),
);

⚠️ Make sure withRTL is composed only after withWeb from @moxy/jest-config-web.

withNTL

An enhancer for React Native apps tested with Native Testing Library.

What's included?

  • Extended matchers: Make assertions easier and clearer by using jest-native.

Usage

To use this enhancer, use the compose function that comes with this package. Keep in mind, the first item should always be the base configuration!

'use strict';

const { compose, baseConfig } = require('@moxy/jest-config-base');
const { withNTL } = require('@moxy/jest-config-testing-library');

module.exports = compose(
    baseConfig('node'),
    withNTL(),
);

⚠️ Make sure withNTL is composed only after withReactNative from @moxy/jest-config-react-native.

Package Sidebar

Install

npm i @moxy/jest-config-testing-library

Weekly Downloads

0

Version

6.1.0

License

MIT

Unpacked Size

5.83 kB

Total Files

4

Last publish

Collaborators

  • tiagodinis
  • moxyhq
  • filipediasf
  • satazor
  • marcooliveira
  • acostalima
  • andregoncalvesdev