Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eliasnorrby/jest-config
:heavy_check_mark: Reusable Jest config
https://github.com/eliasnorrby/jest-config
config jest
Last synced: about 24 hours ago
JSON representation
:heavy_check_mark: Reusable Jest config
- Host: GitHub
- URL: https://github.com/eliasnorrby/jest-config
- Owner: eliasnorrby
- License: mit
- Created: 2019-12-11T07:25:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T05:24:50.000Z (over 1 year ago)
- Last Synced: 2024-10-04T08:38:08.074Z (about 1 month ago)
- Topics: config, jest
- Language: JavaScript
- Homepage:
- Size: 1.41 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Jest Config
[![Travis](https://img.shields.io/travis/com/eliasnorrby/jest-config?style=for-the-badge)](https://travis-ci.com/eliasnorrby/jest-config)
[![npm](https://img.shields.io/npm/v/@eliasnorrby/jest-config?style=for-the-badge)](https://www.npmjs.com/package/@eliasnorrby/jest-config)[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=eliasnorrby/jest-config)](https://dependabot.com)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release):warning: This project is no longer actively maintained :warning:
A Jest config for TypeScript. The setup script provides a one-liner to get Jest
set up in your project.# Setup
## Using `npx`
Run the following command to install and configure jest
```sh
npx @eliasnorrby/jest-config
```This will run a setup script, adding this package to `devDependencies` and writing
the config to `jest.config.js`.### `--no-install`
Run setup with the `--no-install` flag to avoid installing this package as a
dependency. Your `jest.config.js` will contain a basic configuration for you to
add to instead of extending this package.## Manually
Install the package
```sh
npm i -D @eliasnorrby/jest-config
```and add the configuration to `jest.config.js`.
### `jest.config.js`
```js
module.exports = require('@eliasnorrby/jest-config')
```# Overriding settings
```js
module.exports = {
...require('@eliasnorrby/jest-config'),
// Add options here
roots: ['.'],
}
```