talira

jest-junit

Jest reporter that writes JUnit XML files

open sourceApache-2.0free

jest-junit is a Jest reporter that writes test results as JUnit-compatible XML, the format CI systems read for test reports. You add it to Jest's reporters, and set the output path, file name and the templates for suite, class and test names through environment variables, a jest-junit key in package.json or reporter options. It can also run as a testResultsProcessor, which is kept only for legacy reasons.

Problems it solves

  • show Jest test results in my CI's test report tab
  • get a JUnit XML file out of my Jest run for my CI server
  • publish JavaScript test results to a CI dashboard

Features

  • writes Jest test results as JUnit XML for CI test reports
  • output directory, file name and unique file names configurable
  • templates for suite, class and test names
  • configured by environment variables, package.json or reporter options

Limitations

  • Version 17 needs Node.js 20 or newer.1

Alternatives

The same job

These do what jest-junit does.

  1. rspec_junit_formatter Writes RSpec results as JUnit XML that CI services can read
  2. minitest-reporters Customizable output formats for Ruby's Minitest
  3. xcresultparser Parse the binary .xcresult bundles from Xcode builds and test runs
  4. Allure Report Open source HTML test automation report tool

Compare jest-junit with the top 3