1.0.5 • Published 6 years ago

jest-discord-reporter v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Set up

  1. Set up a Discord incoming webhook integration.
  2. Add reporter to package.json under jest.reporters and customize your settings (if you set webhook url using process.env.JEST_DISCORD_WEBHOOK environment variable, then none of them are mandatory). If not, then you have to set it in package.json.
"jest": {
  "reporters": [
    "default",
    [
      "<rootDir>/node_modules/jest-discord-reporter",
      {
        "sendOnlyWhenFailed": true,
        "username": "jest-discord-reporter",
        "webhookUrl": "https://discordapp.com/api/webhooks/XXXXXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      }
    ]
  ]
}

Notes:

  • This package uses env-ci module to get some environment variables from CI services.
  • While sending the report, Environment field value is taken from process.env.CI_NETWORK, and if it's not present, it's taken from process.env.NETWORK (environment variables). This allows to set this value independently on CI services.
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago