Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jest-circus README #7198

Merged
merged 4 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- `[docs]` Removed useless expect.assertions in `TestingAsyncCode.md` ([#7131](https://github.com/facebook/jest/pull/7131))
- `[docs]` Remove references to `@providesModule` which isn't supported anymore ([#7147](https://github.com/facebook/jest/pull/7147))
- `[docs]` Update `setupFiles` documentation for clarity ([#7187](https://github.com/facebook/jest/pull/7187))
- `[jest-circus]` Add readme.md ([#7198](https://github.com/facebook/jest/pull/7198))

### Performance

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img src="http://dp.hanlon.io/313y3u2D0p38/jest.png" height="150" width="150"/>
rickhanlonii marked this conversation as resolved.
Show resolved Hide resolved
<img src="https://jestjs.io/img/jest.png" height="150" width="150"/>
<p align="center">Jest</p>
<p align="center" style="font-size: 0.5em">🃏 Delightful JavaScript Testing</p>
</h1>
Expand Down
18 changes: 1 addition & 17 deletions docs/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Returns the `jest` object for chaining.

### `jest.retryTimes()`

Runs failed tests n-times until they pass or until the max number of retries are exhausted. This only works with jest-circus!
Runs failed tests n-times until they pass or until the max number of retries are exhausted. This only works with [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus)!

Example in a test:

Expand All @@ -326,22 +326,6 @@ test('will fail', () => {
});
```

To run with jest circus:

Install jest-circus

```
yarn add --dev jest-circus
```

Then set as the testRunner in your jest config:

```js
module.exports = {
testRunner: 'jest-circus/runner',
};
```

Returns the `jest` object for chaining.

### `jest.runAllTicks()`
Expand Down
40 changes: 40 additions & 0 deletions packages/jest-circus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<h1 align="center">
<img src="https://jestjs.io/img/jest.png" height="150" width="150"/>
<img src="https://jestjs.io/img/circus.png" height="150" width="150"/>
<p align="center">jest-circus</p>
<p align="center">The next-gen test runner for Jest</p>
</h1>

## Overview

Circus is a flux-based test runner for Jest that is fast, easy to maintain, and simple to extend.
rickhanlonii marked this conversation as resolved.
Show resolved Hide resolved

## Installation

Install `jest-circus` using yarn:

```bash
yarn add --dev jest-cicus
```

Or via npm:

```bash
npm install --save-dev jest-circus
```

## Configure

Configure Jest to use `jest-circus` via the [`testRunner`](https://jestjs.io/docs/en/configuration#testrunner-string) option:

```json
{
"testRunner": "jest-circus/runner"
}
```

Or via CLI:

```bash
jest --testRunner='jest-circus/runner'
```
Binary file added website/static/img/circus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 1 addition & 17 deletions website/versioned_docs/version-23.3/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ Returns the `jest` object for chaining.

### `jest.retryTimes()`

Runs failed tests n-times until they pass or until the max number of retries are exhausted. This only works with jest-circus!
Runs failed tests n-times until they pass or until the max number of retries are exhausted. This only works with [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus)!

Example in a test:

Expand All @@ -327,22 +327,6 @@ test('will fail', () => {
});
```

To run with jest circus:

Install jest-circus

```
yarn add --dev jest-circus
```

Then set as the testRunner in your jest config:

```js
module.exports = {
testRunner: 'jest-circus/runner',
};
```

Returns the `jest` object for chaining.

### `jest.runAllTicks()`
Expand Down