Socket
Socket
Sign inDemoInstall

@jest/reporters

Package Overview
Dependencies
482
Maintainers
6
Versions
131
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @jest/reporters

Jest's reporters


Version published
Maintainers
6
Install size
32.7 MB
Created

Package description

What is @jest/reporters?

The @jest/reporters package provides utilities for handling and customizing the output of test results when using Jest, a popular JavaScript testing framework. It allows developers to create custom reporters to modify how test results are reported, making it easier to integrate with various CI tools, generate reports in different formats, or enhance the testing experience with additional logging and notifications.

What are @jest/reporters's main functionalities?

Custom Test Reporter

This feature allows developers to create a custom test reporter by implementing methods that Jest calls at different stages of the test run. The example shows a basic custom reporter that logs messages at the start and end of the test suite, as well as after each test result.

class MyCustomReporter {
  onRunStart(results, options) {
    console.log('Test suite started');
  }

  onTestResult(test, testResult, aggregatedResult) {
    console.log(`Test ${test.path} finished with ${testResult.numFailingTests} failures`);
  }

  onRunComplete(contexts, results) {
    console.log('All tests completed');
  }
}

module.exports = MyCustomReporter;

Other packages similar to @jest/reporters

Changelog

Source

24.4.0

Features

  • [jest-resolve] Now supports PnP environment without plugins (#8094)

Fixes

  • [expect] Compare DOM nodes even if there are multiple Node classes (#8064)
  • [jest-worker] worker.getStdout() can return null (#8083)
  • [jest-worker] Re-attach stdout and stderr from new processes/threads created after retries (#8087)
  • [jest-reporters/jest-runner] Serialize changedFiles passed to workers (#8090)

Chore & Maintenance

  • [*] Make sure to include d.ts files in the tarball when building (#8086)

FAQs

Last updated on 11 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc