stale/node_modules/jest-circus
PJ Quirk 0649bd8119
Add support to v1 to connect to GHES (#69)
* Bumping actions/github to 2.2.0 for GHES

* Husky commit correct node modules
2020-05-15 15:25:57 -04:00
..
build Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00
LICENSE Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00
README.md Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00
package.json Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00
runner.js Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00
tsconfig.json Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00
tsconfig.tsbuildinfo Add support to v1 to connect to GHES (#69) 2020-05-15 15:25:57 -04:00

README.md

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.

Circus allows you to bind to events via an optional event handler on any custom environment. See the type definitions for more information on the events and state data currently available.

import {NodeEnvironment} from 'jest-environment-node';
import {Event, State} from 'jest-circus';

class MyCustomEnvironment extends NodeEnvironment {
  //...

  handleTestEvent(event: Event, state: State) {
    if (event.name === 'test_start') {
      // ...
    }
  }
}

Mutating event or state data is currently unsupported and may cause unexpected behavior or break in a future release without warning. New events, event data, and/or state data will not be considered a breaking change and may be added in any minor release.

Installation

Install jest-circus using yarn:

yarn add --dev jest-circus

Or via npm:

npm install --save-dev jest-circus

Configure

Configure Jest to use jest-circus via the testRunner option:

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

Or via CLI:

jest --testRunner='jest-circus/runner'