# @carv/jest-preset

Latest version **1.1.9** (published 2020-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @carv/jest-preset
pnpm add @carv/jest-preset
yarn add @carv/jest-preset
bun add @carv/jest-preset
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.9 |
| Published | 2020-12-12 |
| First published | 2020-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.8 |
| Dependencies | 17 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sascha Tandel |
| Maintainers | sastan |

## Links

- npm: https://www.npmjs.com/package/@carv/jest-preset
- Repository: https://github.com/carvjs/tools
- Homepage: https://github.com/carvjs/tools#readme
- Issues: https://github.com/carvjs/tools/issues
- npm.io page: https://npm.io/package/@carv/jest-preset

## Dependencies (17)

- [nps](https://npm.io/package/nps.md) ^5.9.12
- [jest](https://npm.io/package/jest.md) ^26.1.0
- [is-ci](https://npm.io/package/is-ci.md) ^2.0.0
- [esbuild](https://npm.io/package/esbuild.md) ^0.8.14
- [@types/jest](https://npm.io/package/@types/jest.md) ^26.0.13
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.0.6
- [@carv/bundle](https://npm.io/package/@carv/bundle.md) ^1.3.2
- [jest-extended](https://npm.io/package/jest-extended.md) ^0.11.5
- [svelte-jester](https://npm.io/package/svelte-jester.md) ^1.1.5
- [es-module-lexer](https://npm.io/package/es-module-lexer.md) ^0.3.24
- [v8-compile-cache](https://npm.io/package/v8-compile-cache.md) ^2.1.1
- [identity-obj-proxy](https://npm.io/package/identity-obj-proxy.md) ^3.0.0
- [@peculiar/webcrypto](https://npm.io/package/@peculiar/webcrypto.md) ^1.1.3
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^4.0.0
- [jest-svelte-resolver](https://npm.io/package/jest-svelte-resolver.md) ^1.0.0
- [jest-environment-node](https://npm.io/package/jest-environment-node.md) ^26.1.0
- [jest-environment-jsdom-sixteen](https://npm.io/package/jest-environment-jsdom-sixteen.md) ^1.0.3

## Recent versions

- 1.1.9 (latest) — 2020-12-12
- 1.1.8 — 2020-12-10
- 1.1.7 — 2020-11-26
- 1.1.6 — 2020-11-26
- 1.1.5 — 2020-11-25
- 1.1.4 — 2020-11-25
- 1.1.3 — 2020-11-25
- 1.1.2 — 2020-11-25
- 1.1.1 — 2020-11-25
- 1.1.0 — 2020-11-24

## README

# @carv/jest-preset

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Usage](#usage)
- [Features](#features)
- [Configuration](#configuration)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Usage

`package.json`:

```json
{
  "jest": {
    "preset": "@carv/jest-preset"
  }
}
```

The default `testEnvironment` is `jest-environment-jsdom-sixteen`. If the `package.json` field `browser` is `false` `jest-environment-node` is used.

To change the environment for a file use docblock pragma `@env` with either `node` or `jsdom`:

```js
/**
 * @env jsdom
 */
```

- `@carv/scripts/jest-preset.js`
- `jest.setup.js`
- Transforms
  - `*.svelte`
  - `*.module.(css|scss|less)` -> identity object proyy
  - `*.(css|scss|less|jpg|jpeg|png|gif|ico|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)` -> file basename
- test match
  - `src/**/__tests__/*.{js,jsx,ts,tsx`
  - `src/**/*.{spec,test}.{js,jsx,ts,tsx}`

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