Skip to content

Commit

Permalink
Add jest-circus README (#7198)
Browse files Browse the repository at this point in the history
* Add jest-circus README

* Fix lint, add changelog, and update jest-circus mentions

* Grammar is my jam

* Add this back
  • Loading branch information
rickhanlonii committed Oct 18, 2018
1 parent 1b3f2f8 commit 814c929
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,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"/>
<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.

## 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

0 comments on commit 814c929

Please sign in to comment.