diff --git a/CHANGELOG.md b/CHANGELOG.md index 5270873cbc59..86ff52fa7413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 0c452b9af738..abd3c72492a9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

Jest

🃏 Delightful JavaScript Testing

diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 29a107fe86a7..80925ae00ace 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -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: @@ -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()` diff --git a/packages/jest-circus/README.md b/packages/jest-circus/README.md new file mode 100644 index 000000000000..ba37dcaecc30 --- /dev/null +++ b/packages/jest-circus/README.md @@ -0,0 +1,40 @@ +

+ + +

jest-circus

+

The next-gen test runner for Jest

+

+ +## 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' +``` diff --git a/website/static/img/circus.png b/website/static/img/circus.png new file mode 100644 index 000000000000..0fa1c82a51ac Binary files /dev/null and b/website/static/img/circus.png differ diff --git a/website/versioned_docs/version-23.3/JestObjectAPI.md b/website/versioned_docs/version-23.3/JestObjectAPI.md index 4d72a9d02052..fdb912b600f8 100644 --- a/website/versioned_docs/version-23.3/JestObjectAPI.md +++ b/website/versioned_docs/version-23.3/JestObjectAPI.md @@ -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: @@ -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()`