# jest-simple-config

> Jest Config - Simple defaults, extendable options

Latest version **0.4.5** (published 2022-04-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install jest-simple-config
pnpm add jest-simple-config
yarn add jest-simple-config
bun add jest-simple-config
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.5 |
| Published | 2022-04-10 |
| First published | 2019-04-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | helloitsjoe |
| Keywords | jest, config |

## Links

- npm: https://www.npmjs.com/package/jest-simple-config
- Repository: https://github.com/helloitsjoe/jest-simple-config
- Homepage: https://github.com/helloitsjoe/jest-simple-config#readme
- Issues: https://github.com/helloitsjoe/jest-simple-config/issues
- npm.io page: https://npm.io/package/jest-simple-config

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.4.5 (latest) — 2022-04-10
- 0.4.4 — 2022-01-15
- 0.4.3 — 2022-01-15
- 0.4.2 — 2021-12-29
- 0.4.1 — 2021-08-11
- 0.4.0 — 2021-05-30
- 0.2.7 — 2021-05-30
- 0.2.6 — 2021-05-30
- 0.2.5 — 2020-06-28
- 0.2.4 — 2019-09-14
- 0.2.3 — 2019-09-12
- 0.2.2 — 2019-06-27
- 0.2.1 — 2019-06-26
- 0.3.0 — 2019-04-16
- 0.2.0 — 2019-04-08
- … 1 more at https://npm.io/package/jest-simple-config/versions

## README

# jest-simple-config

Generates a Jest config with simple defaults and extendable options.

[![Build Status](https://travis-ci.com/helloitsjoe/jest-simple-config.svg?branch=main)](https://travis-ci.com/helloitsjoe/jest-simple-config)
[![Coverage Status](https://coveralls.io/repos/github/helloitsjoe/jest-simple-config/badge.svg?branch=main)](https://coveralls.io/github/helloitsjoe/jest-simple-config?branch=main)
[![npm](https://img.shields.io/npm/v/jest-simple-config.svg?color=lightgray)](https://www.npmjs.com/package/jest-simple-config)

## Installation

Install as a dev dependency:

```
npm i -D jest-simple-config
```

## Basic Usage

Create a new file `jest.config.js` at the root of your project:

```js
// jest.config.js
const { makeJestConfig } = require('jest-simple-config');
module.exports = makeJestConfig();
```

That's it!

This will give you a basic Jest config, equivalent to the following:

```js
const config = {
  clearMocks: true,
  collectCoverage: true,
  collectCoverageFrom: ['./src/**.js', '!**/__tests__/**', '!/node_modules'],
  coverageDirectory: 'coverage',
  coverageReporters: ['json', 'text', 'html'],
  moduleNameMapper: {
    '\\.(css|less|scss)$': 'identity-obj-proxy',
  },
  testMatch: ['**/__tests__/*.(test|spec|jest).js'],
  testPathIgnorePatterns: ['__tests__/(setup|testUtils).js'],
  verbose: true,
};
```

`collectCoverage` is true by default. If you don't want a coverage report,
setting that option to false will remove the other coverage fields:

```js
const config = makeJestConfig({ collectCoverage: false });
```

will give you the following config:

```js
{
  clearMocks: true,
  moduleNameMapper: {
    '\\.(css|less|scss)$': 'identity-obj-proxy',
  },
  testMatch: ['**/__tests__/*.(test|spec|jest).js'],
  testPathIgnorePatterns: ['__tests__/(setup|testUtils).js'],
  verbose: true,
};
```

---
_Source: https://npm.io/package/jest-simple-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
