# jest-condition

> An enhancer for jest it and describe to dynamic skip some suits and tests.

Latest version **0.0.2** (published 2018-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-condition
pnpm add jest-condition
yarn add jest-condition
bun add jest-condition
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-09-05 |
| First published | 2018-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | yuecjnadt |

## Links

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

## Recent versions

- 0.0.2 (latest) — 2018-09-05
- 0.0.1 — 2018-09-05

## README

# Jest Condition

An enhancer for jest it and describe to dynamic skip some suits and tests.

## Install
```
npm install jest-condition --save-dev
```

set jest config file
```
"setupTestFrameworkScriptFile": "jest-condition"
```

if you have your own setupTestFrameworkScriptFile, you should require jest-condition in top of you own setupTestFrameworkScriptFile;
```
require('jest-condition');
```

## Usage

```
it.condition(true)('test condition', async () => {
});

// you can also add skip or only after condition when debug
it.condition(true).skip('test condition skip', async () => {
});

it.condition(true).only('test condition skip', async () => {
});

describe.condition(true)('describe condition', () => {
});

describe.condition(true).skip('describe condition skip', () => {
});

describe.condition(true).only('describe condition skip', () => {
});
```

## Typescript

use files in tsconfig.json
```
{
  "files": [
    "node_modules/jest-condition/index.d.ts"
  ],
}
```

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