6.2.2 • Published 3 years ago

@invisionag/jest-config-ivx v6.2.2

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

@invisionag/jest-config-ivx

Overview

This Package contains complete configuration of jest for any InVision javascript repository, including:

  • enzyme support (including matchers)
  • styled-components support (including serializer and matchers)
  • stubs for browser functionality (like fetch)missing in jest testing enviroments
  • stubs for asset files

Installation

Install @invisionag/jest-config-ivx as a development dependency.

Usage

General

In your jest.config.js:

module.exports = require('@invisionag/jest-config-ivx');

You can then extend the baseConfig as desired. A simple (complete) example to add an additional setup file would look like this:

  const baseConfig = require('@invisionag/jest-config-ivx');
  module.exports = {
    ...baseConfig,
    setupFiles: [
      ...baseConfig.setupFiles,
      'jest-localstorage-mock',
    ],
  };

Enzyme

Enzyme is a renderer used to initialize react components in a testing enviroment (Documentation). Our jest configuration also ships with matchers to easily assert against enzyme objects (Documentation).

Styled Components

The configuration ships matchers to assert that styled-components elements include certain attributes Documentation

Fetch

We also include a minimalistic fetch mocking library to assert that requests were made by the tested code. See the Documentation for how to use it

6.2.2

3 years ago

6.2.1

3 years ago

6.2.0

3 years ago

6.1.1

4 years ago

6.0.9

4 years ago

6.0.7

4 years ago

6.0.6

4 years ago

6.0.8

4 years ago

6.0.5

4 years ago

6.0.4

4 years ago

6.0.3

4 years ago

6.0.2

4 years ago

6.0.1

4 years ago

6.0.0

4 years ago

5.1.3

4 years ago

5.1.2

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.3.0

4 years ago

4.2.2

4 years ago

4.2.1

5 years ago

4.2.0

5 years ago

4.1.0

5 years ago

4.0.0

5 years ago

3.9.0

5 years ago

3.8.0

5 years ago

3.7.2

5 years ago

3.7.1

5 years ago

3.7.0

5 years ago

3.6.0

5 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.3.1

6 years ago

3.3.0

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

3.0.0-3

6 years ago

3.0.0-2

6 years ago

3.0.0-1

6 years ago

3.0.0-0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0-1

6 years ago

2.0.0-0

6 years ago

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago