/jest-reporter-template

A template for creating custom Jest reporters.

Primary LanguageTypeScript

Jest reporter template

jest XO code style

A template for creating custom Jest reporters using Typescript.

🗒️ Gist

If you'd rather not use this repository here is a Gist with the main interface for creating a Jest reporter.

🚀 Quick start

  1. Clone
git clone https://github.com/ryparker/jest-reporter-template.git my-custom-reporter && cd my-custom-reporter
  1. Install dependencies
yarn install
  1. Transpile to JS
yarn build

🔧 Using the reporter

You will will need to add the reporter's path to the reporters option in your jest.config.js.

Note: Jest config does not automagically transpile Typescript reporters yet. Although there is an open feature request that you can follow.

{
  "reporters": ["<rootDir>/my-custom-reporter.js"]
}

See the official Jest docs for more details.

Related projects

Jest Circus environment: Template Project | Gist