JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q45904F
  • License ISC

A dependency that sends test reports from Jest as messages on a Discord channel using webhooks.

Package Exports

  • jest-discord-bridge
  • jest-discord-bridge/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jest-discord-bridge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

A virtual bridge to see your Jest test error reports on your Discord server!

Install

npm install --save-dev jest-discord-bridge
# or
yarn add -D jest-discord-bridge

Usage

You must configure the jest config. Do not forget webhook from your discord channel.

module.exports = {
    ...
    reporters: [
    'default',
    ['jest-discord-reporter', {
      userName: 'Jest Reporter', //optional, default is 'Jest Reporter'
      avatarUrl: 'https://jestjs.io/pt-BR/img/opengraph.png', // optional, default is jest logo
      webhook: 'https://discordapp.com/api/webhooks/YOUR-WEBHOOK-KEY', //required
      timeZone: 'America/New_York', //optional, default is 'America/New_York'; timeZone list: https://gist.github.com/diogocapela/12c6617fc87607d11fd62d2a4f42b02a, 
      reportIfSuccess: true, // optional, default is false;
    }],
  ],
    ...
}

Result

Result image