@pandell/jest-config

29.0.0 • Public • Published

@pandell/jest-config

Shared testing mocks and helpers for Pandell engineering teams.

Usage

To mock static assets like images, define the following mapping in jest.config.js:

module.exports = {
    // ...
    moduleNameMapper: {
        // ...
        "\\.(jpg|png|svg)$": "@pandell/jest-config/__mocks__/fileMock.js",
    }
}

To perform additional setup tasks as defined in @pandell/jest-config/configureTesting.js, add the following setup definition:

module.exports = {
    // ...
    setupFilesAfterEnv: [
        // ...
        "@pandell/jest-config/configureTesting.js"
    ]
}

Readme

Keywords

Package Sidebar

Install

npm i @pandell/jest-config

Weekly Downloads

6

Version

29.0.0

License

MIT

Unpacked Size

6.08 kB

Total Files

8

Last publish

Collaborators

  • pandell-itsupport